From 3626720d537371277e05891240835b67d46d617e Mon Sep 17 00:00:00 2001 From: Starbuck Johnson Date: Tue, 24 Jun 2014 16:51:36 -0500 Subject: Modify the invalid item set to permit command blocks. Fixes BUKKIT-4342 When using a "vanilla" Minecraft server using the "pick block" key on a command block yields the invoker with a command block within their inventory while in creative mode. Implications of the invalid items set containing the command block also include having a "ghost" item that cannot be placed due to it not actually existing. This commit resolves the problem and brings Craftbukkit closer to vanilla behaviour by removing the command block item ID, 137, from the invalid items set. --- src/main/java/net/minecraft/server/PlayerConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/net') diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java index c2400201..3a984394 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -116,7 +116,7 @@ public class PlayerConnection implements PacketPlayInListener { public CraftPlayer getPlayer() { return (this.player == null) ? null : (CraftPlayer) this.player.getBukkitEntity(); } - private final static HashSet invalidItems = new HashSet(java.util.Arrays.asList(8, 9, 10, 11, 26, 34, 36, 43, 51, 52, 55, 59, 60, 62, 63, 64, 68, 71, 74, 75, 83, 90, 92, 93, 94, 104, 105, 115, 117, 118, 119, 125, 127, 132, 137, 140, 141, 142, 144)); // TODO: Check after every update. + private final static HashSet invalidItems = new HashSet(java.util.Arrays.asList(8, 9, 10, 11, 26, 34, 36, 43, 51, 52, 55, 59, 60, 62, 63, 64, 68, 71, 74, 75, 83, 90, 92, 93, 94, 104, 105, 115, 117, 118, 119, 125, 127, 132, 140, 141, 142, 144)); // TODO: Check after every update. // CraftBukkit end public void a() { -- cgit v1.2.3