Updated Upstream (Bukkit/CraftBukkit) for LootTable API

I have tested that the Replenishing Feature still works as expected.
Lootable API's that now have Bukkit equivalents are now deprecated.

Bukkit Changes:
f0f33981 SPIGOT-1936: LootTable API

CraftBukkit Changes:
c0df4b82 SPIGOT-1936: LootTable API
This commit is contained in:
Aikar 2018-08-12 13:11:08 -04:00
parent 9ac6f9a94f
commit c3b33ee567
37 changed files with 371 additions and 292 deletions

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Add command to reload permissions.yml and require confirm to
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 471ae811..d6686820 100644
index 4c5e0035a..f11cc3db8 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -0,0 +0,0 @@ public final class Bukkit {
@ -24,7 +24,7 @@ index 471ae811..d6686820 100644
public static Server.Spigot spigot()
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 56b0fdb5..5a4528c4 100644
index 4f9dd992a..07a24faa4 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient {
@ -35,7 +35,7 @@ index 56b0fdb5..5a4528c4 100644
+ void reloadPermissions(); // Paper
}
diff --git a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
index 0ab7e295..f331a442 100644
index 0ab7e295d..f331a4423 100644
--- a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
@@ -0,0 +0,0 @@ public class ReloadCommand extends BukkitCommand {
@ -87,7 +87,7 @@ index 0ab7e295..f331a442 100644
}
}
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index b88f31ca..bd0588a2 100644
index b88f31ca2..bd0588a20 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -0,0 +0,0 @@ public final class SimplePluginManager implements PluginManager {

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Add configuration option to prevent player names from being
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 35e18341..9558645f 100644
index 37bf146dc..a8234e626 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -0,0 +0,0 @@ public final class Bukkit {
@ -27,7 +27,7 @@ index 35e18341..9558645f 100644
public static Server.Spigot spigot()
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 12efd654..da0d08b3 100644
index 765efbc31..f164137e4 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient {
@ -46,7 +46,7 @@ index 12efd654..da0d08b3 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/command/PluginCommand.java b/src/main/java/org/bukkit/command/PluginCommand.java
index 2abe1208..c660c178 100644
index 2abe1208f..c660c178c 100644
--- a/src/main/java/org/bukkit/command/PluginCommand.java
+++ b/src/main/java/org/bukkit/command/PluginCommand.java
@@ -0,0 +0,0 @@ public final class PluginCommand extends Command implements PluginIdentifiableCo

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add getTPS method
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index b56c09d3..477a5833 100644
index 5046816b8..bfe388fc0 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -0,0 +0,0 @@ public final class Bukkit {
@ -26,7 +26,7 @@ index b56c09d3..477a5833 100644
* Get the advancement specified by this key.
*
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 4ddb8b02..1fa6f53e 100644
index ae8120e2e..9b71cbffc 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient {

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Command Aliases
Reload the aliases stored in commands.yml
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index d6686820..35e18341 100644
index f11cc3db8..37bf146dc 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -0,0 +0,0 @@ public final class Bukkit {
@ -26,7 +26,7 @@ index d6686820..35e18341 100644
public static Server.Spigot spigot()
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 5a4528c4..12efd654 100644
index 07a24faa4..765efbc31 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient {
@ -37,7 +37,7 @@ index 5a4528c4..12efd654 100644
+ boolean reloadCommandAliases(); // Paper
}
diff --git a/src/main/java/org/bukkit/command/CommandMap.java b/src/main/java/org/bukkit/command/CommandMap.java
index 30d60247..938959aa 100644
index 30d60247e..938959aa5 100644
--- a/src/main/java/org/bukkit/command/CommandMap.java
+++ b/src/main/java/org/bukkit/command/CommandMap.java
@@ -0,0 +0,0 @@ public interface CommandMap {
@ -55,7 +55,7 @@ index 30d60247..938959aa 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
index 4aea03c6..63d27392 100644
index 4aea03c69..63d273927 100644
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -0,0 +0,0 @@ public class SimpleCommandMap implements CommandMap {
@ -70,7 +70,7 @@ index 4aea03c6..63d27392 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
index f331a442..a977045d 100644
index f331a4423..a977045de 100644
--- a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
@@ -0,0 +0,0 @@ public class ReloadCommand extends BukkitCommand {

View file

@ -7,7 +7,7 @@ Provides basic elements of a PlayerProfile to be used by future API/events
diff --git a/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java
new file mode 100644
index 00000000..1a69e5f7
index 000000000..1a69e5f75
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java
@@ -0,0 +0,0 @@
@ -154,7 +154,7 @@ index 00000000..1a69e5f7
+}
diff --git a/src/main/java/com/destroystokyo/paper/profile/ProfileProperty.java b/src/main/java/com/destroystokyo/paper/profile/ProfileProperty.java
new file mode 100644
index 00000000..d17061e6
index 000000000..d17061e66
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/ProfileProperty.java
@@ -0,0 +0,0 @@
@ -231,7 +231,7 @@ index 00000000..d17061e6
+ }
+}
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 9558645f..86e72f95 100644
index a8234e626..39e52986c 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -0,0 +0,0 @@ import org.bukkit.generator.ChunkGenerator;
@ -283,7 +283,7 @@ index 9558645f..86e72f95 100644
public static Server.Spigot spigot()
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index da0d08b3..878255a4 100644
index f164137e4..64c78caf3 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -0,0 +0,0 @@ import org.bukkit.generator.ChunkGenerator;

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Expose server CommandMap
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 477a5833..73c85063 100644
index bfe388fc0..dbfd6e41d 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -0,0 +0,0 @@ import org.bukkit.boss.BarColor;
@ -39,7 +39,7 @@ index 477a5833..73c85063 100644
{
return server.spigot();
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 1fa6f53e..70e19580 100644
index 9b71cbffc..c23ae761e 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -0,0 +0,0 @@ import org.bukkit.boss.BarColor;

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses
Change Javadoc to be accurate
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 73c85063b..471ae811c 100644
index dbfd6e41d..4c5e0035a 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -0,0 +0,0 @@ public final class Bukkit {
@ -37,7 +37,7 @@ index 73c85063b..471ae811c 100644
* Gets the name of the update folder. The update folder is used to safely
* update plugins at the right moment on a plugin load.
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 70e195808..56b0fdb55 100644
index c23ae761e..4f9dd992a 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient {
@ -68,7 +68,7 @@ index 70e195808..56b0fdb55 100644
* Gets the name of the update folder. The update folder is used to safely
* update plugins at the right moment on a plugin load.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index d5b904e61..0b14317e3 100644
index e5e611201..45e9484dc 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline

View file

@ -12,32 +12,37 @@ Provides methods to determine players looted state for an object
diff --git a/src/main/java/com/destroystokyo/paper/loottable/Lootable.java b/src/main/java/com/destroystokyo/paper/loottable/Lootable.java
new file mode 100644
index 00000000..d962a0ce
index 000000000..7dd3955b5
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/loottable/Lootable.java
@@ -0,0 +0,0 @@
+package com.destroystokyo.paper.loottable;
+
+import org.bukkit.Bukkit;
+import org.bukkit.NamespacedKey;
+import org.bukkit.loot.LootTable;
+
+/**
+ * Defines an object that has a Loot Table and seed associated with it.
+ *
+ * <p>
+ * How the Loot Table and seed are used may vary based on Minecraft Versions
+ * and what type of object is using the Loot Table
+ *
+ * @deprecated Use {@link org.bukkit.loot.Lootable}
+ */
+public interface Lootable {
+@Deprecated
+public interface Lootable extends org.bukkit.loot.Lootable {
+
+ /**
+ * Gets the name of the Loot Table to be used in the World Folder
+ *
+ * @return The name, or null if no loot table exists
+ * @deprecated Use {@link org.bukkit.loot.Lootable#getLootTable()}
+ */
+ String getLootTableName();
+
+ /**
+ * Returns whether or not this object has a Loot Table
+ * @return Has a loot table
+ */
+ default boolean hasLootTable() {
+ return getLootTableName() != null;
+ @Deprecated
+ default String getLootTableName() {
+ LootTable lootTable = getLootTable();
+ return lootTable != null && lootTable.getKey() != null ? lootTable.getKey().toString() : null;
+ }
+
+ /**
@ -46,7 +51,9 @@ index 00000000..d962a0ce
+ *
+ * @param name name in either foo or minecraft:foo format
+ * @return The previous Loot Table before the change
+ * @deprecated Use {@link org.bukkit.loot.Lootable#setLootTable(LootTable)}
+ */
+ @Deprecated
+ default String setLootTable(String name) {
+ return setLootTable(name, 0);
+ }
@ -58,45 +65,53 @@ index 00000000..d962a0ce
+ * @param name name in either foo or minecraft:foo format
+ * @param seed seed for the loot table. If 0, seed will be random
+ * @return The previous Loot Table before the change
+ * @deprecated Use {@link org.bukkit.loot.Lootable#setSeed(long)}
+ */
+ String setLootTable(String name, long seed);
+ @Deprecated
+ default String setLootTable(String name, long seed) {
+ String prev = getLootTableName();
+ LootTable lootTable = Bukkit.getLootTable(NamespacedKey.minecraft(name));
+ setLootTable(lootTable, seed);
+ return prev;
+ }
+
+ /**
+ * Gets the current seed associated to the Loot Table on this object
+ *
+ * @return The seed, or 0 for random
+ * @deprecated Use {@link org.bukkit.loot.Lootable#getSeed()}
+ */
+ long getLootTableSeed();
+ @Deprecated
+ default long getLootTableSeed() {
+ return getSeed();
+ }
+
+ /**
+ * Changes the current seed associated with the Loot Table on this object.
+ *
+ * <p>
+ * The seed will have no affect if this object does not have a Loot Table
+ * associated with it.
+ *
+ * @throws IllegalStateException If called when this object does not have a loot table
+ * @param seed The seed to use, or 0 for random
+ * @return The previous seed
+ * @throws IllegalStateException If called when this object does not have a loot table
+ * @deprecated Use {@link org.bukkit.loot.Lootable#setSeed(long)}
+ */
+ @Deprecated
+ default long setLootTableSeed(long seed) {
+ final String lootTableName = getLootTableName();
+ if (lootTableName == null) {
+ throw new IllegalStateException("This object does not currently have a Loot Table.");
+ }
+
+ long prev = getLootTableSeed();
+ setLootTable(lootTableName, seed);
+ long prev = getSeed();
+ setSeed(seed);
+ return prev;
+ }
+
+ /**
+ * Clears the associated Loot Table to this object
+ */
+ void clearLootTable();
+}
diff --git a/src/main/java/com/destroystokyo/paper/loottable/LootableBlockInventory.java b/src/main/java/com/destroystokyo/paper/loottable/LootableBlockInventory.java
new file mode 100644
index 00000000..5e93e7e3
index 000000000..9095df616
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/loottable/LootableBlockInventory.java
@@ -0,0 +0,0 @@
@ -104,6 +119,9 @@ index 00000000..5e93e7e3
+
+import org.bukkit.block.Block;
+
+/**
+ * Represents an Inventory that can generate loot, such as Chests inside of Fortresses and Mineshafts
+ */
+public interface LootableBlockInventory extends LootableInventory {
+
+ /**
@ -114,7 +132,7 @@ index 00000000..5e93e7e3
+}
diff --git a/src/main/java/com/destroystokyo/paper/loottable/LootableEntityInventory.java b/src/main/java/com/destroystokyo/paper/loottable/LootableEntityInventory.java
new file mode 100644
index 00000000..8bebf070
index 000000000..a389f74c6
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/loottable/LootableEntityInventory.java
@@ -0,0 +0,0 @@
@ -122,6 +140,9 @@ index 00000000..8bebf070
+
+import org.bukkit.entity.Entity;
+
+/**
+ * Represents an Inventory that can generate loot, such as Minecarts inside of Mineshafts
+ */
+public interface LootableEntityInventory extends LootableInventory {
+
+ /**
@ -132,7 +153,7 @@ index 00000000..8bebf070
+}
diff --git a/src/main/java/com/destroystokyo/paper/loottable/LootableInventory.java b/src/main/java/com/destroystokyo/paper/loottable/LootableInventory.java
new file mode 100644
index 00000000..cde999ef
index 000000000..cde999ef4
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/loottable/LootableInventory.java
@@ -0,0 +0,0 @@
@ -249,7 +270,7 @@ index 00000000..cde999ef
+}
diff --git a/src/main/java/com/destroystokyo/paper/loottable/LootableInventoryReplenishEvent.java b/src/main/java/com/destroystokyo/paper/loottable/LootableInventoryReplenishEvent.java
new file mode 100644
index 00000000..2169493d
index 000000000..2169493d9
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/loottable/LootableInventoryReplenishEvent.java
@@ -0,0 +0,0 @@
@ -295,76 +316,172 @@ index 00000000..2169493d
+ }
+}
diff --git a/src/main/java/org/bukkit/block/Chest.java b/src/main/java/org/bukkit/block/Chest.java
index 97dc7813..a24a4094 100644
index 815d79a53..b68ab881d 100644
--- a/src/main/java/org/bukkit/block/Chest.java
+++ b/src/main/java/org/bukkit/block/Chest.java
@@ -0,0 +0,0 @@
package org.bukkit.block;
+import com.destroystokyo.paper.loottable.LootableBlockInventory;
import org.bukkit.Nameable;
+import com.destroystokyo.paper.loottable.LootableInventory; // Paper
import org.bukkit.inventory.Inventory;
import org.bukkit.loot.Lootable;
@@ -0,0 +0,0 @@ import org.bukkit.loot.Lootable;
/**
* Represents a captured state of a chest.
*/
-public interface Chest extends Container, Nameable {
+public interface Chest extends Container, Nameable, LootableInventory { // Paper
-public interface Chest extends Container, Nameable, Lootable {
+public interface Chest extends Container, Nameable, LootableBlockInventory { // Paper
/**
* Gets the inventory of the chest block represented by this block state.
diff --git a/src/main/java/org/bukkit/block/Dispenser.java b/src/main/java/org/bukkit/block/Dispenser.java
index 108332df..4430b123 100644
index 2741625db..6d180117e 100644
--- a/src/main/java/org/bukkit/block/Dispenser.java
+++ b/src/main/java/org/bukkit/block/Dispenser.java
@@ -0,0 +0,0 @@
package org.bukkit.block;
+import com.destroystokyo.paper.loottable.LootableBlockInventory;
import org.bukkit.Nameable;
+import com.destroystokyo.paper.loottable.LootableInventory; // Paper
import org.bukkit.loot.Lootable;
import org.bukkit.projectiles.BlockProjectileSource;
@@ -0,0 +0,0 @@ import org.bukkit.projectiles.BlockProjectileSource;
/**
* Represents a captured state of a dispenser.
*/
-public interface Dispenser extends Container, Nameable {
+public interface Dispenser extends Container, Nameable, LootableInventory { // Paper
-public interface Dispenser extends Container, Nameable, Lootable {
+public interface Dispenser extends Container, Nameable, LootableBlockInventory { // Paper
/**
* Gets the BlockProjectileSource object for the dispenser.
diff --git a/src/main/java/org/bukkit/block/Dropper.java b/src/main/java/org/bukkit/block/Dropper.java
index 2e8c3f711..47737b590 100644
--- a/src/main/java/org/bukkit/block/Dropper.java
+++ b/src/main/java/org/bukkit/block/Dropper.java
@@ -0,0 +0,0 @@
package org.bukkit.block;
+import com.destroystokyo.paper.loottable.LootableBlockInventory;
import org.bukkit.Nameable;
import org.bukkit.loot.Lootable;
/**
* Represents a captured state of a dropper.
*/
-public interface Dropper extends Container, Nameable, Lootable {
+public interface Dropper extends Container, Nameable, LootableBlockInventory { // Paper
/**
* Tries to drop a randomly selected item from the dropper's inventory,
diff --git a/src/main/java/org/bukkit/block/Hopper.java b/src/main/java/org/bukkit/block/Hopper.java
index bc3aeef2..5b698613 100644
index 73fce5f33..221123e8c 100644
--- a/src/main/java/org/bukkit/block/Hopper.java
+++ b/src/main/java/org/bukkit/block/Hopper.java
@@ -0,0 +0,0 @@
package org.bukkit.block;
+import com.destroystokyo.paper.loottable.LootableBlockInventory;
import org.bukkit.Nameable;
+import com.destroystokyo.paper.loottable.LootableInventory; // Paper
import org.bukkit.loot.Lootable;
/**
* Represents a captured state of a hopper.
*/
-public interface Hopper extends Container, Nameable { }
+public interface Hopper extends Container, Nameable, LootableInventory { } // Paper
\ No newline at end of file
-public interface Hopper extends Container, Nameable, Lootable { }
+public interface Hopper extends Container, Nameable, LootableBlockInventory { } // Paper
diff --git a/src/main/java/org/bukkit/block/ShulkerBox.java b/src/main/java/org/bukkit/block/ShulkerBox.java
index 4c1740e7..aa1109c4 100644
index 8e061e4a4..1c02c6e1c 100644
--- a/src/main/java/org/bukkit/block/ShulkerBox.java
+++ b/src/main/java/org/bukkit/block/ShulkerBox.java
@@ -0,0 +0,0 @@
package org.bukkit.block;
+import com.destroystokyo.paper.loottable.LootableInventory;
+import com.destroystokyo.paper.loottable.LootableBlockInventory;
import org.bukkit.DyeColor;
import org.bukkit.Nameable;
import org.bukkit.loot.Lootable;
@@ -0,0 +0,0 @@ import org.bukkit.loot.Lootable;
/**
* Represents a captured state of a ShulkerBox.
*/
-public interface ShulkerBox extends Container, Nameable {
+public interface ShulkerBox extends Container, Nameable, LootableInventory { // Paper
-public interface ShulkerBox extends Container, Nameable, Lootable {
+public interface ShulkerBox extends Container, Nameable, LootableBlockInventory { // Paper
/**
* Get the {@link DyeColor} corresponding to this ShulkerBox
diff --git a/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java b/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java
index 8ced54039..865885501 100644
--- a/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java
+++ b/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java
@@ -0,0 +0,0 @@
package org.bukkit.entity.minecart;
+import com.destroystokyo.paper.loottable.LootableEntityInventory;
import org.bukkit.entity.Minecart;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.loot.Lootable;
@@ -0,0 +0,0 @@ import org.bukkit.loot.Lootable;
/**
* Represents a Minecart with a Hopper inside it
*/
-public interface HopperMinecart extends Minecart, InventoryHolder, Lootable {
+public interface HopperMinecart extends Minecart, InventoryHolder, LootableEntityInventory {
/**
* Checks whether or not this Minecart will pick up
diff --git a/src/main/java/org/bukkit/entity/minecart/StorageMinecart.java b/src/main/java/org/bukkit/entity/minecart/StorageMinecart.java
index 9ea403e6f..238d118f7 100644
--- a/src/main/java/org/bukkit/entity/minecart/StorageMinecart.java
+++ b/src/main/java/org/bukkit/entity/minecart/StorageMinecart.java
@@ -0,0 +0,0 @@
package org.bukkit.entity.minecart;
+import com.destroystokyo.paper.loottable.LootableEntityInventory;
import org.bukkit.entity.Minecart;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.loot.Lootable;
@@ -0,0 +0,0 @@ import org.bukkit.loot.Lootable;
* minecarts} have their own inventory that can be accessed using methods
* from the {@link InventoryHolder} interface.
*/
-public interface StorageMinecart extends Minecart, InventoryHolder, Lootable {
+public interface StorageMinecart extends Minecart, InventoryHolder, LootableEntityInventory { // Paper
}
diff --git a/src/main/java/org/bukkit/loot/Lootable.java b/src/main/java/org/bukkit/loot/Lootable.java
index f4b3d0215..98a472055 100644
--- a/src/main/java/org/bukkit/loot/Lootable.java
+++ b/src/main/java/org/bukkit/loot/Lootable.java
@@ -0,0 +0,0 @@ public interface Lootable {
*/
LootTable getLootTable();
+ // Paper start
+ /**
+ * Set the loot table and seed for a container or entity at the same time.
+ *
+ * @param table the Loot Table this {@link org.bukkit.block.Container} or {@link org.bukkit.entity.Mob} will have.
+ * @param seed the seed to used to generate loot. Default is 0.
+ */
+ void setLootTable(LootTable table, long seed);
+
+ /**
+ * Returns whether or not this object has a Loot Table
+ * @return Has a loot table
+ */
+ default boolean hasLootTable() {
+ return getLootTable() != null;
+ }
+
+ /**
+ * Clears the associated Loot Table to this object
+ */
+ default void clearLootTable() {
+ setLootTable(null);
+ }
+ // Paper end
+
/**
* Set the seed used when this Loot Table generates loot.
*
--

View file

@ -3004,7 +3004,7 @@ index 000000000..df592d855
+ }
+}
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index ff7f436cb..b56c09d3e 100644
index 5b1a2a8bd..5046816b8 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -0,0 +0,0 @@ public final class Bukkit {
@ -3016,7 +3016,7 @@ index ff7f436cb..b56c09d3e 100644
/**
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index a766ee96c..4ddb8b02c 100644
index df3ce745c..ae8120e2e 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient {

View file

@ -9,7 +9,7 @@ In Offline Mode, will return an Offline UUID
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 01a226d9..b389677a 100644
index 39e52986c..491c73832 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -0,0 +0,0 @@ public final class Bukkit {
@ -34,7 +34,7 @@ index 01a226d9..b389677a 100644
* Gets the plugin manager for interfacing with plugins.
*
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 6c96fc14..f5aee1c5 100644
index 64c78caf3..f75fe8b15 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add UnknownCommandEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 4da2ada651..237d7696c7 100644
index 51ea2013e8..42b3447a1a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.util.Versioning;

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add configurable despawn distances for living entities
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index de8680e4d..02f7e506e 100644
index de8680e4dd..02f7e506e3 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
@ -30,7 +30,7 @@ index de8680e4d..02f7e506e 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 3744d01ec..27c97530f 100644
index 6e324ad589..98b28e8573 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving {

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Add configuration option to prevent player names from being
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 9f1182c72..e97dbaf8e 100644
index 9f1182c723..e97dbaf8e3 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -0,0 +0,0 @@ public class PaperConfig {
@ -20,7 +20,7 @@ index 9f1182c72..e97dbaf8e 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 84057ebfb..18829f303 100644
index 476b01f70f..17b398cde0 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {

View file

@ -33,7 +33,7 @@ index f135349174..85c7a96c5a 100644
} else {
String[] astring1 = astring;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6e3539ab8d..7a7617750e 100644
index 3861c63cb8..ff1f71310e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add velocity warnings
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index d7e77a849a..e701b37cb4 100644
index 5230867326..53adc9e1a0 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
@ -17,7 +17,7 @@ index d7e77a849a..e701b37cb4 100644
private final class BooleanWrapper {
private boolean value = true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 34246369c5..03a3328b06 100644
index 249d8115e8..dedf1526e6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -0,0 +0,0 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Command Aliases
Reload the aliases stored in commands.yml
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a869757b9..84057ebfb 100644
index ff1f71310e..476b01f70f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
https://github.com/PaperMC/Paper/issues/49
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ed823bef1..4dd49110a 100644
index b68af1c285..f70629a868 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Allow nerfed mobs to jump
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index cacf58607..de8680e4d 100644
index cacf58607c..de8680e4dd 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
@ -19,7 +19,7 @@ index cacf58607..de8680e4d 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/ControllerJump.java b/src/main/java/net/minecraft/server/ControllerJump.java
index 4ed5192c6..489beed26 100644
index 4ed5192c65..489beed269 100644
--- a/src/main/java/net/minecraft/server/ControllerJump.java
+++ b/src/main/java/net/minecraft/server/ControllerJump.java
@@ -0,0 +0,0 @@ public class ControllerJump {
@ -31,7 +31,7 @@ index 4ed5192c6..489beed26 100644
this.b.o(this.a);
this.a = false;
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index d24ff109c..3744d01ec 100644
index 25413c70b5..6e324ad589 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving {
@ -56,7 +56,7 @@ index d24ff109c..3744d01ec 100644
}
// Spigot End
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
index 0d9505138..38a0b2db1 100644
index 0d95051383..38a0b2db1e 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
@@ -0,0 +0,0 @@ public class PathfinderGoalFloat extends PathfinderGoal {

View file

@ -85,7 +85,7 @@ index 60d9f5706a..a912fb3414 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 7157a5b136..76679a4231 100644
index 3d4bb6d8c9..b5fd412b74 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {

View file

@ -7,7 +7,7 @@ Establishes base extension of profile systems for future edits too
diff --git a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java
new file mode 100644
index 000000000..b151a13c1
index 0000000000..b151a13c1b
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java
@@ -0,0 +0,0 @@
@ -293,7 +293,7 @@ index 000000000..b151a13c1
+}
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java
new file mode 100644
index 000000000..25836b975
index 0000000000..25836b975b
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperAuthenticationService.java
@@ -0,0 +0,0 @@
@ -329,7 +329,7 @@ index 000000000..25836b975
+}
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java
new file mode 100644
index 000000000..3bcdb8f93
index 0000000000..3bcdb8f93f
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperGameProfileRepository.java
@@ -0,0 +0,0 @@
@ -352,7 +352,7 @@ index 000000000..3bcdb8f93
+}
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java
new file mode 100644
index 000000000..4b2a67423
index 0000000000..4b2a67423f
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java
@@ -0,0 +0,0 @@
@ -387,7 +387,7 @@ index 000000000..4b2a67423
+}
diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java b/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java
new file mode 100644
index 000000000..3aceb0ea8
index 0000000000..3aceb0ea8a
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperUserAuthentication.java
@@ -0,0 +0,0 @@
@ -403,7 +403,7 @@ index 000000000..3aceb0ea8
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
index 381542e0d..80927de08 100644
index 381542e0d2..80927de08b 100644
--- a/src/main/java/net/minecraft/server/MCUtil.java
+++ b/src/main/java/net/minecraft/server/MCUtil.java
@@ -0,0 +0,0 @@
@ -428,7 +428,7 @@ index 381542e0d..80927de08 100644
* Calculates distance between 2 entities
* @param e1
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 5635997d0..02b621880 100644
index 5635997d0b..02b6218807 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
@ -449,7 +449,7 @@ index 5635997d0..02b621880 100644
return this.V;
}
diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java
index a47a51a41..4c476f757 100644
index a47a51a412..4c476f757c 100644
--- a/src/main/java/net/minecraft/server/UserCache.java
+++ b/src/main/java/net/minecraft/server/UserCache.java
@@ -0,0 +0,0 @@ public class UserCache {
@ -485,7 +485,7 @@ index a47a51a41..4c476f757 100644
private UserCacheEntry(GameProfile gameprofile, Date date) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 79524885d..ee7f16ca3 100644
index 42b3447a1a..3d4bb6d8c9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey;

View file

@ -21,7 +21,7 @@ index bb1c1c57cc..667a0dde8c 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 9fcc8c782d..204cf4f648 100644
index 8fa7f6e1bb..649fff95b0 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
@ -78,7 +78,7 @@ index dcc1d08b16..4c33c331f0 100644
public void a(Packet<?> packet) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 5634b1c85e..6e3539ab8d 100644
index 7ad009c073..3861c63cb8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
@ -91,7 +91,7 @@ index 5634b1c85e..6e3539ab8d 100644
for (int j = -short1; j <= short1; j += 16) {
for (int k = -short1; k <= short1; k += 16) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 29a5ac639e..e3e45ed48a 100644
index cb80fce3b5..907791a5f1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {

View file

@ -16,7 +16,7 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe
A config option has been added for those who depend on the previous behavior, but I don't expect that.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 280cfd5534..40c5ea4745 100644
index fd00c320ce..620f23f4f0 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -0,0 +0,0 @@ public class PaperConfig {
@ -30,7 +30,7 @@ index 280cfd5534..40c5ea4745 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e701b37cb4..030d68a704 100644
index 53adc9e1a0..b68af1c285 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {

View file

@ -12,7 +12,7 @@ keep it vanilla in behavior
a player may teleport away, and trigger instant despawn
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 14d122b22b..7b64ec27c3 100644
index bca2aa8298..903434e5f4 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving {

View file

@ -48,7 +48,7 @@ index 5d42cfe81c..dc38e4e043 100644
} else if (this.player.getChatFlags() == EntityHuman.EnumChatVisibility.SYSTEM) {
// Do nothing, this is coming from a plugin
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6ad91a16f2..a270d31b22 100644
index 1c003a3898..d9cba38080 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Expose server CommandMap
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a270d31b22..d7e77a849a 100644
index d9cba38080..5230867326 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {

View file

@ -155,7 +155,7 @@ index c72bdd29d1..687250c639 100644
this.aa += 50L;
// Spigot end
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c2d479dd11..d28205cdfc 100644
index 567af5b9fa..1c003a3898 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Item#canEntityPickup
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 3723fd9770..14d122b22b 100644
index 0cfda190bc..bca2aa8298 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving {

View file

@ -137,14 +137,12 @@ index 0000000000..1150dee01e
+}
diff --git a/src/main/java/com/destroystokyo/paper/loottable/CraftLootableInventory.java b/src/main/java/com/destroystokyo/paper/loottable/CraftLootableInventory.java
new file mode 100644
index 0000000000..668097620f
index 0000000000..b72232093b
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/loottable/CraftLootableInventory.java
@@ -0,0 +0,0 @@
+package com.destroystokyo.paper.loottable;
+
+import org.apache.commons.lang.Validate;
+
+import java.util.UUID;
+
+public interface CraftLootableInventory extends CraftLootable, LootableInventory {
@ -163,30 +161,6 @@ index 0000000000..668097620f
+ }
+
+ @Override
+ default String getLootTableName() {
+ return getLootableData().getLootable().getLootTableName();
+ }
+
+ @Override
+ default String setLootTable(String name, long seed) {
+ Validate.notNull(name);
+
+ String prevLootTable = getLootTableName();
+ getLootableData().getLootable().setLootTable(name, seed);
+ return prevLootTable;
+ }
+
+ @Override
+ default long getLootTableSeed() {
+ return getLootableData().getLootable().getLootTableSeed();
+ }
+
+ @Override
+ default void clearLootTable() {
+ getLootableData().getLootable().clearLootTable();
+ }
+
+ @Override
+ default boolean hasPlayerLooted(UUID player) {
+ return getLootableData().hasPlayerLooted(player);
+ }
@ -231,7 +205,7 @@ index 0000000000..668097620f
+}
diff --git a/src/main/java/com/destroystokyo/paper/loottable/CraftLootableInventoryData.java b/src/main/java/com/destroystokyo/paper/loottable/CraftLootableInventoryData.java
new file mode 100644
index 0000000000..9a65603bcb
index 0000000000..8547205456
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/loottable/CraftLootableInventoryData.java
@@ -0,0 +0,0 @@
@ -240,6 +214,7 @@ index 0000000000..9a65603bcb
+import com.destroystokyo.paper.PaperWorldConfig;
+import net.minecraft.server.*;
+import org.bukkit.entity.Player;
+import org.bukkit.loot.LootTable;
+
+import javax.annotation.Nullable;
+import java.util.HashMap;
@ -275,15 +250,11 @@ index 0000000000..9a65603bcb
+ return prev;
+ }
+
+ CraftLootableInventory getLootable() {
+ return lootable;
+ }
+
+ public boolean shouldReplenish(@Nullable EntityHuman player) {
+ String tableName = this.lootable.getLootTableName();
+ LootTable table = this.lootable.getLootTable();
+
+ // No Loot Table associated
+ if (tableName == null) {
+ if (table == null) {
+ return false;
+ }
+
@ -418,17 +389,21 @@ index 0000000000..9a65603bcb
+ }
+}
diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
index 9ec73ac06a..8bd7976f97 100644
index 91b38fd64b..7120f00b6a 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
@@ -0,0 +0,0 @@ import javax.annotation.Nullable;
@@ -0,0 +0,0 @@ import java.util.Random;
import javax.annotation.Nullable;
// CraftBukkit start
import java.util.List;
+// Paper start
+import com.destroystokyo.paper.loottable.CraftLootableInventoryData;
+import com.destroystokyo.paper.loottable.CraftLootableInventory;
+import com.destroystokyo.paper.loottable.LootableInventory;
+import org.bukkit.Bukkit;
+import org.bukkit.craftbukkit.util.CraftNamespacedKey;
+// Paper end
import org.bukkit.Location;
+
+import com.destroystokyo.paper.loottable.CraftLootableInventoryData; // Paper
+import com.destroystokyo.paper.loottable.CraftLootableInventory; // Paper
+import com.destroystokyo.paper.loottable.LootableInventory; // Paper
import org.bukkit.craftbukkit.entity.CraftHumanEntity;
import org.bukkit.entity.HumanEntity;
import org.bukkit.inventory.InventoryHolder;
@ -439,9 +414,10 @@ index 9ec73ac06a..8bd7976f97 100644
private NonNullList<ItemStack> items;
private boolean b;
private MinecraftKey c;
- private long d;
+ private long d;public long getLootTableSeed() { return d; } // Paper - OBFHELPER
- private MinecraftKey c;
- public long d; // CraftBukkit private -> public
+ private MinecraftKey c; private MinecraftKey getLootTableKey() { return c; } private void setLootTable(MinecraftKey key) { c = key; } // Paper - OBFHELPER
+ public long d; public long getSeed() { return d; } public void setSeed(long seed) { d = seed; } // Paper - OBFHELPER // CraftBukkit private -> public
// CraftBukkit start
public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
@ -488,21 +464,27 @@ index 9ec73ac06a..8bd7976f97 100644
if (this.d == 0L) {
@@ -0,0 +0,0 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
this.items.clear();
}
+ public void setLootTable(MinecraftKey key, long seed) { a(key, seed);} // Paper - OBFHELPER
public void a(MinecraftKey minecraftkey, long i) {
this.c = minecraftkey;
this.d = i;
}
+ public MinecraftKey getLootTableKey() { return Q_(); } // Paper - OBFHELPER
public MinecraftKey Q_() {
return this.c;
}
+
+ // Paper start
+ @Override
+ public org.bukkit.loot.LootTable getLootTable() {
+ return getLootTableKey() != null ? Bukkit.getLootTable(CraftNamespacedKey.fromMinecraft(getLootTableKey())) : null;
+ }
+
+ @Override
+ public void setLootTable(org.bukkit.loot.LootTable table, long seed) {
+ setLootTable(table);
+ setSeed(seed);
+ }
+
+ @Override
+ public void setLootTable(org.bukkit.loot.LootTable table) {
+ MinecraftKey newKey = (table == null) ? null : CraftNamespacedKey.toMinecraft(table.getKey());
+ setLootTable(newKey);
+ }
+ private final CraftLootableInventoryData lootableData = new CraftLootableInventoryData(this);
+
+ @Override
@ -519,36 +501,22 @@ index 9ec73ac06a..8bd7976f97 100644
+ public World getNMSWorld() {
+ return this.world;
+ }
+
+ public String getLootTableName() {
+ final MinecraftKey key = getLootTableKey();
+ return key != null ? key.toString() : null;
+ }
+
+ @Override
+ public String setLootTable(String name, long seed) {
+ String prev = getLootTableName();
+ setLootTable(new MinecraftKey(name), seed);
+ return prev;
+ }
+
+ @Override
+ public void clearLootTable() {
+ //noinspection RedundantCast
+ this.c = (MinecraftKey) null;
+ }
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java
index fbda02b321..e6fc1ae923 100644
index fbda02b321..e0f87a3533 100644
--- a/src/main/java/net/minecraft/server/TileEntityLootable.java
+++ b/src/main/java/net/minecraft/server/TileEntityLootable.java
@@ -0,0 +0,0 @@
package net.minecraft.server;
+import com.destroystokyo.paper.loottable.CraftLootableInventoryData; // Paper
+import com.destroystokyo.paper.loottable.CraftLootableInventory; // Paper
+import com.destroystokyo.paper.loottable.LootableInventory; // Paper
+// Paper start
+import com.destroystokyo.paper.loottable.CraftLootableInventoryData;
+import com.destroystokyo.paper.loottable.CraftLootableInventory;
+import com.destroystokyo.paper.loottable.LootableInventory;
+import org.bukkit.Bukkit;
+import org.bukkit.craftbukkit.util.CraftNamespacedKey;
+// Paper end
+
import java.util.Random;
import javax.annotation.Nullable;
@ -556,9 +524,10 @@ index fbda02b321..e6fc1ae923 100644
-public abstract class TileEntityLootable extends TileEntityContainer implements ILootable {
+public abstract class TileEntityLootable extends TileEntityContainer implements ILootable, CraftLootableInventory { // Paper
protected MinecraftKey g;
- protected MinecraftKey g;
- protected long h;
+ protected long h; public long getLootTableSeed() { return h; } // Paper - OBFHELPER
+ protected MinecraftKey g; private MinecraftKey getLootTableKey() { return g; } private void setLootTable(MinecraftKey key) { g = key; } // Paper - OBFHELPER
+ protected long h; public long getSeed() { return h; } public void setSeed(long seed) { h = seed; } // Paper - OBFHELPER
protected IChatBaseComponent i;
protected TileEntityLootable(TileEntityTypes<?> tileentitytypes) {
@ -602,23 +571,26 @@ index fbda02b321..e6fc1ae923 100644
if (this.h == 0L) {
@@ -0,0 +0,0 @@ public abstract class TileEntityLootable extends TileEntityContainer implements
}
+ public MinecraftKey getLootTableKey() { return Q_(); } // Paper - OBFHELPER
public MinecraftKey Q_() {
return this.g;
}
+ public void setLootTable(MinecraftKey key, long seed) { a(key, seed);} // Paper - OBFHELPER
public void a(MinecraftKey minecraftkey, long i) {
this.g = minecraftkey;
this.h = i;
@@ -0,0 +0,0 @@ public abstract class TileEntityLootable extends TileEntityContainer implements
protected abstract NonNullList<ItemStack> q();
protected abstract void a(NonNullList<ItemStack> nonnulllist);
+ // Paper start - LootTable API
+ @Override
+ public org.bukkit.loot.LootTable getLootTable() {
+ return getLootTableKey() != null ? Bukkit.getLootTable(CraftNamespacedKey.fromMinecraft(getLootTableKey())) : null;
+ }
+
+ @Override
+ public void setLootTable(org.bukkit.loot.LootTable table, long seed) {
+ setLootTable(table);
+ setSeed(seed);
+ }
+
+ @Override
+ public void setLootTable(org.bukkit.loot.LootTable table) {
+ MinecraftKey newKey = (table == null) ? null : CraftNamespacedKey.toMinecraft(table.getKey());
+ setLootTable(newKey);
+ }
+ private final CraftLootableInventoryData lootableData = new CraftLootableInventoryData(this);
+
+ @Override
@ -635,24 +607,6 @@ index fbda02b321..e6fc1ae923 100644
+ public World getNMSWorld() {
+ return world;
+ }
+
+ public String getLootTableName() {
+ final MinecraftKey key = getLootTableKey();
+ return key != null ? key.toString() : null;
+ }
+
+ @Override
+ public String setLootTable(String name, long seed) {
+ String prev = getLootTableName();
+ setLootTable(new MinecraftKey(name), seed);
+ return prev;
+ }
+
+ @Override
+ public void clearLootTable() {
+ //noinspection RedundantCast
+ this.g = (MinecraftKey) null;
+ }
+ // Paper end
+
}
@ -690,68 +644,37 @@ index dff5bb5171..e7b719b43d 100644
public CraftChest(final Block block) {
super(block, TileEntityChest.class);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java b/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java
index 1dc8bfecd2..bfcf9b6c4d 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java
@@ -0,0 +0,0 @@
package org.bukkit.craftbukkit.block;
+import com.destroystokyo.paper.loottable.CraftLootableBlockInventory; // Paper
import net.minecraft.server.BlockDispenser;
import net.minecraft.server.BlockPosition;
import net.minecraft.server.Blocks;
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource;
import org.bukkit.inventory.Inventory;
import org.bukkit.projectiles.BlockProjectileSource;
-public class CraftDispenser extends CraftLootable<TileEntityDispenser> implements Dispenser {
+public class CraftDispenser extends CraftLootable<TileEntityDispenser> implements Dispenser, CraftLootableBlockInventory {
public CraftDispenser(final Block block) {
super(block, TileEntityDispenser.class);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java b/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java
index 6566554ab6..df156d0d92 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java
@@ -0,0 +0,0 @@
package org.bukkit.craftbukkit.block;
+import com.destroystokyo.paper.loottable.CraftLootableBlockInventory; // Paper
import net.minecraft.server.TileEntityHopper;
import org.bukkit.Material;
import org.bukkit.block.Block;
@@ -0,0 +0,0 @@ import org.bukkit.block.Hopper;
import org.bukkit.craftbukkit.inventory.CraftInventory;
import org.bukkit.inventory.Inventory;
-public class CraftHopper extends CraftLootable<TileEntityHopper> implements Hopper {
+public class CraftHopper extends CraftLootable<TileEntityHopper> implements Hopper, CraftLootableBlockInventory {
public CraftHopper(final Block block) {
super(block, TileEntityHopper.class);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java
index c029a12441..c26f0b5afc 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
index 34bcc49cf9..7ff7d33f06 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
@@ -0,0 +0,0 @@
package org.bukkit.craftbukkit.block;
+import com.destroystokyo.paper.loottable.CraftLootableBlockInventory;
import net.minecraft.server.BlockShulkerBox;
import net.minecraft.server.TileEntityShulkerBox;
import org.bukkit.DyeColor;
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.inventory.CraftInventory;
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
import org.bukkit.inventory.Inventory;
import net.minecraft.server.MinecraftKey;
import net.minecraft.server.TileEntityLootable;
import org.bukkit.Bukkit;
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey;
import org.bukkit.loot.LootTable;
import org.bukkit.loot.Lootable;
-public class CraftShulkerBox extends CraftLootable<TileEntityShulkerBox> implements ShulkerBox {
+public class CraftShulkerBox extends CraftLootable<TileEntityShulkerBox> implements ShulkerBox, CraftLootableBlockInventory {
-public abstract class CraftLootable<T extends TileEntityLootable> extends CraftContainer<T> implements Nameable, Lootable {
+public abstract class CraftLootable<T extends TileEntityLootable> extends CraftContainer<T> implements Nameable, Lootable, CraftLootableBlockInventory {
public CraftShulkerBox(final Block block) {
super(block, TileEntityShulkerBox.class);
public CraftLootable(Block block, Class<T> tileEntityClass) {
super(block, tileEntityClass);
@@ -0,0 +0,0 @@ public abstract class CraftLootable<T extends TileEntityLootable> extends CraftC
setLootTable(getLootTable(), seed);
}
- private void setLootTable(LootTable table, long seed) {
+ public void setLootTable(LootTable table, long seed) { // Paper - public
MinecraftKey key = (table == null) ? null : CraftNamespacedKey.toMinecraft(table.getKey());
getSnapshot().a(key, seed); // PAIL setLootTable
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
index 69435c4576..4291edf252 100644
index 1b5b266c05..3d5225e9f2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
@@ -0,0 +0,0 @@
@ -765,13 +688,26 @@ index 69435c4576..4291edf252 100644
import org.bukkit.inventory.Inventory;
@SuppressWarnings("deprecation")
-public class CraftMinecartChest extends CraftMinecart implements StorageMinecart {
+public class CraftMinecartChest extends CraftMinecart implements StorageMinecart, CraftLootableEntityInventory { // Paper
-public class CraftMinecartChest extends CraftMinecartContainer implements StorageMinecart {
+public class CraftMinecartChest extends CraftMinecartContainer implements StorageMinecart, CraftLootableEntityInventory { // Paper
private final CraftInventory inventory;
public CraftMinecartChest(CraftServer server, EntityMinecartChest entity) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java
index 8ce9737451..7e11993aa6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java
@@ -0,0 +0,0 @@ public abstract class CraftMinecartContainer extends CraftMinecart implements Lo
return getHandle().d; // PAIL rename lootTableSeed
}
- private void setLootTable(LootTable table, long seed) {
+ public void setLootTable(LootTable table, long seed) {
MinecraftKey newKey = (table == null) ? null : CraftNamespacedKey.toMinecraft(table.getKey());
getHandle().a(newKey, seed);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
index e9963e21cd..acb4dee04f 100644
index f29365c948..c51de47433 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
@@ -0,0 +0,0 @@
@ -785,9 +721,35 @@ index e9963e21cd..acb4dee04f 100644
import org.bukkit.entity.minecart.HopperMinecart;
import org.bukkit.inventory.Inventory;
-final class CraftMinecartHopper extends CraftMinecart implements HopperMinecart {
+final class CraftMinecartHopper extends CraftMinecart implements HopperMinecart, CraftLootableEntityInventory { // Paper
-public final class CraftMinecartHopper extends CraftMinecartContainer implements HopperMinecart {
+public final class CraftMinecartHopper extends CraftMinecartContainer implements HopperMinecart, CraftLootableEntityInventory { // Paper
private final CraftInventory inventory;
CraftMinecartHopper(CraftServer server, EntityMinecartHopper entity) {
public CraftMinecartHopper(CraftServer server, EntityMinecartHopper entity) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
index eb643cff3a..a3789c86b0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
@@ -0,0 +0,0 @@
package org.bukkit.craftbukkit.entity;
import net.minecraft.server.EntityInsentient;
+import net.minecraft.server.MinecraftKey;
import org.bukkit.Bukkit;
import org.bukkit.NamespacedKey;
import org.bukkit.craftbukkit.CraftServer;
@@ -0,0 +0,0 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
getHandle().bI = (table == null) ? null : CraftNamespacedKey.toMinecraft(table.getKey()); // PAIL rename lootTableKey
}
+ // Paper start
+ public void setLootTable(LootTable table, long seed) {
+ setLootTable(table);
+ setSeed(seed);
+ }
+ // Paper end
+
@Override
public LootTable getLootTable() {
if (getHandle().bI == null) {
--

View file

@ -581,7 +581,7 @@ index 73bd5e1d74..e1cf1e579a 100644
this.world = new CraftWorld((WorldServer) this, gen, env);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 7cd9b3b8cb..4c1486a38e 100644
index 6ee7c56ada..ed3c23b74e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
@ -636,7 +636,7 @@ index 7cd9b3b8cb..4c1486a38e 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index df07dc5946..57da619d80 100644
index 484869a8a8..f1e8320034 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -0,0 +0,0 @@ public class Main {
@ -655,7 +655,7 @@ index df07dc5946..57da619d80 100644
};
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 9128f77543..7b1a9a8a0e 100644
index 95f7a9587a..87bc8e2d9c 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -0,0 +0,0 @@ public class SpigotWorldConfig

View file

@ -19,7 +19,7 @@ index c5bc976c79..ca14080ccd 100644
// CraftBukkit start
public boolean fauxSleeping;
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 27c97530fa..3723fd9770 100644
index 98b28e8573..0cfda190bc 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving {

View file

@ -7,7 +7,7 @@ Metadata is not meant to persist reload as things break badly with non primitive
This will remove metadata on reload so it does not crash everything if a plugin uses it.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 83364efb50..f3af4ba520 100644
index f70629a868..7ad009c073 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java
index 220ca7bca..eb4b08be4 100644
index 220ca7bca0..eb4b08be46 100644
--- a/src/main/java/net/minecraft/server/EULA.java
+++ b/src/main/java/net/minecraft/server/EULA.java
@@ -0,0 +0,0 @@ public class EULA {
@ -25,7 +25,7 @@ index 220ca7bca..eb4b08be4 100644
}
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 83a73b86e..d8874c398 100644
index ce4bf0a68f..c72bdd29d1 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
@ -38,7 +38,7 @@ index 83a73b86e..d8874c398 100644
public CrashReport b(CrashReport crashreport) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ebc2d690b..c2d479dd1 100644
index a4112c54ea..567af5b9fa 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ import org.bukkit.event.server.TabCompleteEvent;
@ -51,7 +51,7 @@ index ebc2d690b..c2d479dd1 100644
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index f1e832003..f7a4d53ed 100644
index f1e8320034..f7a4d53ede 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -0,0 +0,0 @@ public class Main {
@ -64,7 +64,7 @@ index f1e832003..f7a4d53ed 100644
Thread.sleep(TimeUnit.SECONDS.toMillis(20));
}
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 94a3d4237..91b8aa6a1 100644
index 94a3d4237d..91b8aa6a16 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -0,0 +0,0 @@ public class WatchdogThread extends Thread

View file

@ -1445,7 +1445,7 @@ index 2c6f6de4ce..f032ecab64 100644
// CraftBukkit start
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 4c1486a38e..ebc2d690b0 100644
index ed3c23b74e..a4112c54ea 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {

View file

@ -199,7 +199,7 @@ index bf1fffcfee..af430b73f0 100644
System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true));
System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true));
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7a7893c4df..f88ba7db7f 100644
index a49393b2f5..5635997d0b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -0,0 +0,0 @@ import org.apache.commons.lang3.Validate;
@ -271,7 +271,7 @@ index 0b0d996523..4cbe148010 100644
this.k = new GameProfileBanList(PlayerList.a);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f1a4f4529c..4da2ada651 100644
index 17b398cde0..51ea2013e8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ import java.nio.ByteBuffer;

View file

@ -9,7 +9,7 @@ In Offline Mode, will return an Offline UUID
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 76679a4231..8a58479f4d 100644
index b5fd412b74..0552659354 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {

@ -1 +1 @@
Subproject commit c23d391fcdf19a054ebf5ac886a5679c2bf0ad49
Subproject commit f0f3398172aa20a2ea1f29bf69799c4a920f24e3

@ -1 +1 @@
Subproject commit 15da7067067a0786d221f2ad3cd060acd4dd3431
Subproject commit c0df4b82d380bea4fd66cc887a1476468e2301c4