Skip to content

Commit

Permalink
Removed event on inventory GUI. Fix for # 9 / 1.10.2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dries007 committed Jul 22, 2016
1 parent b38e02a commit 3c7e8ab
Showing 1 changed file with 12 additions and 12 deletions.
Expand Up @@ -128,16 +128,16 @@ public void entityItemPickupEvent(EntityItemPickupEvent event)
if (!Helper.shouldCare(player)) return;
event.getItem().setEntityItemStack(GlobalBanList.process(player.dimension, event.getItem().getEntityItem()));
}

@SubscribeEvent(priority = EventPriority.HIGHEST)
public void playerOpenContainerEvent(PlayerOpenContainerEvent event)
{
EntityPlayer player = event.getEntityPlayer();
if (!Helper.shouldCare(player)) return;
if (player.getEntityData().getInteger(Helper.MODID) != player.openContainer.hashCode()) // Crude is inventory changed
{
player.getEntityData().setInteger(Helper.MODID, player.openContainer.hashCode());
GlobalBanList.process(player.dimension, player.openContainer, player);
}
}
//
// @SubscribeEvent(priority = EventPriority.HIGHEST)
// public void playerOpenContainerEvent(PlayerOpenContainerEvent event)
// {
// EntityPlayer player = event.getEntityPlayer();
// if (!Helper.shouldCare(player)) return;
// if (player.getEntityData().getInteger(Helper.MODID) != player.openContainer.hashCode()) // Crude is inventory changed
// {
// player.getEntityData().setInteger(Helper.MODID, player.openContainer.hashCode());
// GlobalBanList.process(player.dimension, player.openContainer, player);
// }
// }
}

0 comments on commit 3c7e8ab

Please sign in to comment.