SPIGOT-3110: SHULKER_BOX InventoryType

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2017-03-08 17:56:08 +11:00
parent 5e2981ee0f
commit f6f4501444
2 changed files with 10 additions and 0 deletions

View File

@@ -250,6 +250,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
openCustomInventory(inventory, player, "minecraft:anvil");
}
break;
case SHULKER_BOX:
if (iinventory instanceof TileEntityShulkerBox) {
getHandle().openTileEntity((TileEntityShulkerBox) iinventory);
} else {
openCustomInventory(inventory, player, "minecraft:shulker_box");
}
break;
case CREATIVE:
case CRAFTING:
throw new IllegalArgumentException("Can't open a " + type + " inventory!");