mirror of
https://github.com/PretzelJohn/VillagerTradeLimiter.git
synced 2024-12-01 06:33:36 +01:00
Merge pull request #6 from mastercake10/master
make config option `IgnoreHeldItems` work by removing Enum#ordinal
This commit is contained in:
commit
5f279ea12e
@ -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