diff --git a/WindSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/WindSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java index 2dc5f9de0..41b30cc6d 100644 --- a/WindSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java +++ b/WindSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java @@ -95,6 +95,9 @@ public boolean c(EntityHuman entityhuman) { public static String getNotchInventoryType(InventoryType type) { switch (type) { + case CREATIVE: + case CRAFTING: + throw new IllegalArgumentException("Can't open a " + type + " inventory!"); case WORKBENCH: return "minecraft:crafting_table"; case FURNACE: @@ -119,7 +122,8 @@ public static String getNotchInventoryType(InventoryType type) { private void setupSlots(IInventory top, IInventory bottom) { switch (cachedType) { case CREATIVE: - break; // TODO: This should be an error? + case CRAFTING: + throw new IllegalArgumentException("Can't open a " + cachedType + " inventory!"); case PLAYER: case CHEST: setupChest(top, bottom); @@ -130,7 +134,6 @@ private void setupSlots(IInventory top, IInventory bottom) { case FURNACE: setupFurnace(top, bottom); break; - case CRAFTING: // TODO: This should be an error? case WORKBENCH: setupWorkbench(top, bottom); break;