Skip to content

Commit

Permalink
Fix cast error
Browse files Browse the repository at this point in the history
  • Loading branch information
Morphan1 committed Dec 22, 2013
1 parent 2586796 commit ee86db7
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -2743,7 +2743,8 @@ public void inventoryCloseEvent(InventoryCloseEvent event) {
context.put("inventory", dInventory.mirrorBukkitInventory(event.getInventory()));

if (event.getInventory().getHolder() instanceof Player) {
PlayerInventory inv = (PlayerInventory) event.getInventory();
// Don't use event.getInventory() or event.getPlayer().getInventory() here...
PlayerInventory inv = (PlayerInventory) event.getInventory().getHolder().getInventory();
ItemStack[] armor_contents = inv.getArmorContents();
for (int s = 0; s < 4; s++) {
if (armor_contents[0].getType() != Material.AIR)
Expand Down

0 comments on commit ee86db7

Please sign in to comment.