mirror of
https://github.com/PretzelJohn/VillagerTradeLimiter.git
synced 2024-11-28 13:15:29 +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;
|
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