Skip to content

Commit

Permalink
fix clicked inventory NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Apr 25, 2019
1 parent 0b073b2 commit e917fba
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -360,7 +360,9 @@ public void inventoryClickEvent(InventoryClickEvent event) {
context.put("slot_type", new Element(slotType));
context.put("slot", new Element(event.getSlot() + 1));
context.put("raw_slot", new Element(event.getRawSlot() + 1));
context.put("clicked_inventory", dInventory.mirrorBukkitInventory(event.getClickedInventory()));
if (event.getClickedInventory() != null) {
context.put("clicked_inventory", dInventory.mirrorBukkitInventory(event.getClickedInventory()));
}
context.put("is_shift_click", new Element(event.isShiftClick()));
context.put("action", new Element(event.getAction().name()));
context.put("hotbar_button", new Element(event.getHotbarButton() + 1));
Expand Down

0 comments on commit e917fba

Please sign in to comment.