fix block restriction not working

This commit is contained in:
Oth3r 2023-11-25 10:37:07 -06:00
commit eb65aacd4d

View file

@ -54,7 +54,7 @@ public class Events {
// if item is NOT in whitelist // if item is NOT in whitelist
if (!checkList(Utl.getList(player,type,"whitelist"),targetStack)) { if (!checkList(Utl.getList(player,type,"whitelist"),targetStack)) {
// if block is restricted and items is block, false, ect // if block is restricted and items is block, false, ect
if (Utl.getBool(player,type,"blocks") && (targetStack.getItem() instanceof BlockItem)) return false; if (Utl.getBool(player,type,"block") && (targetStack.getItem() instanceof BlockItem)) return false;
if (Utl.getBool(player,type,"food") && food.contains(targetStack.getUseAction())) return false; if (Utl.getBool(player,type,"food") && food.contains(targetStack.getUseAction())) return false;
if (Utl.getBool(player,type,"usable") && !notUsable.contains(targetStack.getUseAction())) return false; if (Utl.getBool(player,type,"usable") && !notUsable.contains(targetStack.getUseAction())) return false;
} }