mirror of
https://github.com/PretzelJohn/VillagerTradeLimiter.git
synced 2025-01-23 16:11:32 +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;
|
if(instance.getCfg().getStringList("DisableWorlds").contains(villager.getWorld().getName())) return;
|
||||||
|
|
||||||
//Skips when player is holding an ignored item
|
//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) {
|
if(heldItem != null) {
|
||||||
Material heldItemType = heldItem.getType();
|
Material heldItemType = heldItem.getType();
|
||||||
for(String ignoredType : instance.getCfg().getStringList("IgnoreHeldItems")) {
|
for(String ignoredType : instance.getCfg().getStringList("IgnoreHeldItems")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user