diff --git a/src/main/java/net/minecraft/server/ItemInWorldManager.java b/src/main/java/net/minecraft/server/ItemInWorldManager.java index e163a2c0ca..aa63a1c4cf 100644 --- a/src/main/java/net/minecraft/server/ItemInWorldManager.java +++ b/src/main/java/net/minecraft/server/ItemInWorldManager.java @@ -271,6 +271,7 @@ public class ItemInWorldManager { return false; } else { int l = this.world.getTypeId(i, j, k); + if (Block.byId[l] == null) return false; // CraftBukkit - a plugin set block to air without cancelling int i1 = this.world.getData(i, j, k); this.world.a(this.player, 2001, i, j, k, l + (this.world.getData(i, j, k) << 12)); diff --git a/src/main/java/net/minecraft/server/PlayerInventory.java b/src/main/java/net/minecraft/server/PlayerInventory.java index 88566f49fb..f1275e6881 100644 --- a/src/main/java/net/minecraft/server/PlayerInventory.java +++ b/src/main/java/net/minecraft/server/PlayerInventory.java @@ -363,12 +363,6 @@ public class PlayerInventory implements IInventory { } public boolean b(Block block) { - // CraftBukkit start - fixed NPE - if (block == null) { - return false; - } - // CraftBukkit end - if (block.material.isAlwaysDestroyable()) { return true; } else {