From 8e2fde68c4c218e0b0b53c36fef430be0bfdeb82 Mon Sep 17 00:00:00 2001 From: Morphan1 Date: Sat, 1 Nov 2014 21:18:10 -0400 Subject: [PATCH] Fix '- inventory open' for workbenches in@workbench and in@generic[holder=workbench] both work now --- .../denizen/scripts/commands/item/InventoryCommand.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/aufdemrand/denizen/scripts/commands/item/InventoryCommand.java b/src/main/java/net/aufdemrand/denizen/scripts/commands/item/InventoryCommand.java index 9e69d46d15..dbcec747e6 100644 --- a/src/main/java/net/aufdemrand/denizen/scripts/commands/item/InventoryCommand.java +++ b/src/main/java/net/aufdemrand/denizen/scripts/commands/item/InventoryCommand.java @@ -88,9 +88,10 @@ public void execute(final ScriptEntry scriptEntry) throws CommandExecutionExcept // Make the attached player open the destination inventory case OPEN: // Use special method to make opening workbenches work properly - if (destination.getIdHolder().equalsIgnoreCase("workbench")) { + if (destination.getIdType().equals("workbench") + || destination.getIdHolder().equalsIgnoreCase("workbench")) { scriptEntry.getPlayer().getPlayerEntity() - .openWorkbench(destination.getLocation(), true); + .openWorkbench(null, true); } // Otherwise, open inventory as usual else scriptEntry.getPlayer().getPlayerEntity().openInventory(destination.getInventory());