-
-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,601 changed files
with
204,240 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Eclipse stuff | ||
/.classpath | ||
/.project | ||
/.settings | ||
|
||
# netbeans | ||
/nbproject | ||
|
||
# we use maven! | ||
/build.xml | ||
|
||
# maven | ||
/target | ||
|
||
# vim | ||
.*.sw[a-p] | ||
|
||
# various other potential build files | ||
/build | ||
/bin | ||
/dist | ||
/manifest.mf | ||
|
||
# Mac filesystem dust | ||
.DS_Store | ||
|
||
# intellij | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Bukkit | ||
====== | ||
|
||
A Minecraft Server API. | ||
|
||
Website: [http://bukkit.org](http://bukkit.org) | ||
Bugs/Suggestions: [http://leaky.bukkit.org](http://leaky.bukkit.org) | ||
Contributing Guidelines: [CONTRIBUTING.md](https://github.com/Bukkit/Bukkit/blob/master/CONTRIBUTING.md) | ||
|
||
Compilation | ||
----------- | ||
|
||
We use maven to handle our dependencies. | ||
|
||
* Install [Maven 3](http://maven.apache.org/download.html) | ||
* Check out this repo and: `mvn clean install` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.bukkit</groupId> | ||
<artifactId>bukkit</artifactId> | ||
<version>1.7.10-R0.1-SNAPSHOT</version> | ||
<name>Bukkit</name> | ||
<url>http://www.bukkit.org</url> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<scm> | ||
<developerConnection>scm:git:git@github.com:Bukkit/Bukkit.git</developerConnection> | ||
<connection>scm:git:git://github.com/Bukkit/Bukkit.git</connection> | ||
<url>https://github.com/Bukkit/Bukkit/tree/master/</url> | ||
</scm> | ||
|
||
<ciManagement> | ||
<system>jenkins</system> | ||
<url>http://ci.bukkit.org</url> | ||
</ciManagement> | ||
|
||
<distributionManagement> | ||
<site> | ||
<id>jd.bukkit.org</id> | ||
<url>file:///home/javadocs/public_html/</url> | ||
</site> | ||
<repository> | ||
<id>repobo-rel</id> | ||
<name>repo.bukkit.org Releases</name> | ||
<url>http://repo.bukkit.org/content/repositories/releases/</url> | ||
</repository> | ||
<snapshotRepository> | ||
<id>repobo-snap</id> | ||
<name>repo.bukkit.org Snapshots</name> | ||
<url>http://repo.bukkit.org/content/repositories/snapshots/</url> | ||
</snapshotRepository> | ||
</distributionManagement> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>2.3.2</version> | ||
<configuration> | ||
<source>1.6</source> | ||
<target>1.6</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<version>1.4</version> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-site-plugin</artifactId> | ||
<version>3.0-beta-3</version> | ||
<configuration> | ||
<reportPlugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>jxr-maven-plugin</artifactId> | ||
<version>2.0-beta-1</version> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>2.7</version> | ||
<configuration> | ||
<linksource>true</linksource> | ||
</configuration> | ||
<reportSets> | ||
<reportSet> | ||
<reports> | ||
<report>javadoc</report> | ||
</reports> | ||
</reportSet> | ||
</reportSets> | ||
</plugin> | ||
</reportPlugins> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.yaml</groupId> | ||
<artifactId>snakeyaml</artifactId> | ||
<version>1.9</version> | ||
<type>jar</type> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.googlecode.json-simple</groupId> | ||
<artifactId>json-simple</artifactId> | ||
<version>1.1</version> | ||
<type>jar</type> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.avaje</groupId> | ||
<artifactId>ebean</artifactId> | ||
<version>2.7.3</version> | ||
<type>jar</type> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.guava</groupId> | ||
<artifactId>guava</artifactId> | ||
<version>10.0.1</version> | ||
<type>jar</type> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-lang</groupId> | ||
<artifactId>commons-lang</artifactId> | ||
<version>2.3</version> | ||
</dependency> | ||
|
||
<!-- testing --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.11</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest-library</artifactId> | ||
<version>1.3</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
package org.bukkit; | ||
|
||
/** | ||
* Represents an achievement, which may be given to players. | ||
*/ | ||
public enum Achievement { | ||
OPEN_INVENTORY, | ||
MINE_WOOD (OPEN_INVENTORY), | ||
BUILD_WORKBENCH (MINE_WOOD), | ||
BUILD_PICKAXE (BUILD_WORKBENCH), | ||
BUILD_FURNACE (BUILD_PICKAXE), | ||
ACQUIRE_IRON (BUILD_FURNACE), | ||
BUILD_HOE (BUILD_WORKBENCH), | ||
MAKE_BREAD (BUILD_HOE), | ||
BAKE_CAKE (BUILD_HOE), | ||
BUILD_BETTER_PICKAXE (BUILD_PICKAXE), | ||
COOK_FISH (BUILD_FURNACE), | ||
ON_A_RAIL (ACQUIRE_IRON), | ||
BUILD_SWORD (BUILD_WORKBENCH), | ||
KILL_ENEMY (BUILD_SWORD), | ||
KILL_COW (BUILD_SWORD), | ||
FLY_PIG (KILL_COW), | ||
SNIPE_SKELETON (KILL_ENEMY), | ||
GET_DIAMONDS (ACQUIRE_IRON), | ||
NETHER_PORTAL (GET_DIAMONDS), | ||
GHAST_RETURN (NETHER_PORTAL), | ||
GET_BLAZE_ROD (NETHER_PORTAL), | ||
BREW_POTION (GET_BLAZE_ROD), | ||
END_PORTAL (GET_BLAZE_ROD), | ||
THE_END (END_PORTAL), | ||
ENCHANTMENTS (GET_DIAMONDS), | ||
OVERKILL (ENCHANTMENTS), | ||
BOOKCASE (ENCHANTMENTS), | ||
EXPLORE_ALL_BIOMES (END_PORTAL), | ||
SPAWN_WITHER (THE_END), | ||
KILL_WITHER (SPAWN_WITHER), | ||
FULL_BEACON (KILL_WITHER), | ||
BREED_COW (KILL_COW), | ||
DIAMONDS_TO_YOU (GET_DIAMONDS), | ||
; | ||
|
||
private final Achievement parent; | ||
|
||
private Achievement() { | ||
parent = null; | ||
} | ||
|
||
private Achievement(Achievement parent) { | ||
this.parent = parent; | ||
} | ||
|
||
/** | ||
* Returns whether or not this achievement has a parent achievement. | ||
* | ||
* @return whether the achievement has a parent achievement | ||
*/ | ||
public boolean hasParent() { | ||
return parent != null; | ||
} | ||
|
||
/** | ||
* Returns the parent achievement of this achievement, or null if none. | ||
* | ||
* @return the parent achievement or null | ||
*/ | ||
public Achievement getParent() { | ||
return parent; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
package org.bukkit; | ||
|
||
import java.util.HashMap; | ||
|
||
import org.apache.commons.lang.Validate; | ||
|
||
import com.google.common.collect.Maps; | ||
|
||
/** | ||
* Represents the art on a painting | ||
*/ | ||
public enum Art { | ||
KEBAB(0, 1, 1), | ||
AZTEC(1, 1, 1), | ||
ALBAN(2, 1, 1), | ||
AZTEC2(3, 1, 1), | ||
BOMB(4, 1, 1), | ||
PLANT(5, 1, 1), | ||
WASTELAND(6, 1, 1), | ||
POOL(7, 2, 1), | ||
COURBET(8, 2, 1), | ||
SEA(9, 2, 1), | ||
SUNSET(10, 2, 1), | ||
CREEBET(11, 2, 1), | ||
WANDERER(12, 1, 2), | ||
GRAHAM(13, 1, 2), | ||
MATCH(14, 2, 2), | ||
BUST(15, 2, 2), | ||
STAGE(16, 2, 2), | ||
VOID(17, 2, 2), | ||
SKULL_AND_ROSES(18, 2, 2), | ||
WITHER(19, 2, 2), | ||
FIGHTERS(20, 4, 2), | ||
POINTER(21, 4, 4), | ||
PIGSCENE(22, 4, 4), | ||
BURNINGSKULL(23, 4, 4), | ||
SKELETON(24, 4, 3), | ||
DONKEYKONG(25, 4, 3); | ||
|
||
private int id, width, height; | ||
private static final HashMap<String, Art> BY_NAME = Maps.newHashMap(); | ||
private static final HashMap<Integer, Art> BY_ID = Maps.newHashMap(); | ||
|
||
private Art(int id, int width, int height) { | ||
this.id = id; | ||
this.width = width; | ||
this.height = height; | ||
} | ||
|
||
/** | ||
* Gets the width of the painting, in blocks | ||
* | ||
* @return The width of the painting, in blocks | ||
*/ | ||
public int getBlockWidth() { | ||
return width; | ||
} | ||
|
||
/** | ||
* Gets the height of the painting, in blocks | ||
* | ||
* @return The height of the painting, in blocks | ||
*/ | ||
public int getBlockHeight() { | ||
return height; | ||
} | ||
|
||
/** | ||
* Get the ID of this painting. | ||
* | ||
* @return The ID of this painting | ||
* @deprecated Magic value | ||
*/ | ||
@Deprecated | ||
public int getId() { | ||
return id; | ||
} | ||
|
||
/** | ||
* Get a painting by its numeric ID | ||
* | ||
* @param id The ID | ||
* @return The painting | ||
* @deprecated Magic value | ||
*/ | ||
@Deprecated | ||
public static Art getById(int id) { | ||
return BY_ID.get(id); | ||
} | ||
|
||
/** | ||
* Get a painting by its unique name | ||
* <p> | ||
* This ignores underscores and capitalization | ||
* | ||
* @param name The name | ||
* @return The painting | ||
*/ | ||
public static Art getByName(String name) { | ||
Validate.notNull(name, "Name cannot be null"); | ||
|
||
return BY_NAME.get(name.toLowerCase().replaceAll("_", "")); | ||
} | ||
|
||
static { | ||
for (Art art : values()) { | ||
BY_ID.put(art.id, art); | ||
BY_NAME.put(art.toString().toLowerCase().replaceAll("_", ""), art); | ||
} | ||
} | ||
} |
Oops, something went wrong.