Skip to content

Commit

Permalink
Fix '- inventory open' for workbenches
Browse files Browse the repository at this point in the history
in@workbench and in@generic[holder=workbench] both work now
  • Loading branch information
Morphan1 committed Nov 2, 2014
1 parent 57c51bd commit 8e2fde6
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -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());
Expand Down

0 comments on commit 8e2fde6

Please sign in to comment.