mirror of
https://github.com/PretzelJohn/VillagerTradeLimiter.git
synced 2025-01-07 00:17:38 +01:00
make config option IgnoreHeldItems
work by removing Enum#ordinal
This commit is contained in:
parent
542eb20e8a
commit
411a0abc66
@ -48,7 +48,7 @@ public class PlayerListener implements Listener {
|
||||
if(instance.getCfg().getStringList("DisableWorlds").contains(villager.getWorld().getName())) return;
|
||||
|
||||
//Skips when player is holding an ignored item
|
||||
ItemStack heldItem = player.getInventory().getItem(event.getHand().ordinal());
|
||||
ItemStack heldItem = player.getInventory().getItem(event.getHand());
|
||||
if(heldItem != null) {
|
||||
Material heldItemType = heldItem.getType();
|
||||
for(String ignoredType : instance.getCfg().getStringList("IgnoreHeldItems")) {
|
||||
|
Loading…
Reference in New Issue
Block a user