Arckenver / Nations

UNMAINTAINED - Minecraft Sponge Plugin - Towny-like Worldguard-like protection plugin
MIT License
15 stars 34 forks source link

Empty hand #198

Open Gobrunk opened 5 years ago

Gobrunk commented 5 years ago

On branch api7, a player can open a chest when his hand is empty even if he is not allowed to interract on the claim. It might come from here, with the isWhitelisted which puts "air" as a whitelisted item :

if (optItem.isPresent() && (ConfigHandler.isWhitelisted("use", optItem.get().getType().getId()) || optItem.get().getType().equals(ItemTypes.GOLDEN_AXE) && ConfigHandler.getNode("others", "enableGoldenAxe").getBoolean(true)))
            return;
MineTears commented 4 years ago

Is there any fix? I don't know what to do at all :(

antoineok commented 4 years ago

fix and pull request, you can now have a patched version by downloading this patched version (or building yourself the plugin) Nations211-2.11-S7.0-MC1.12.1_patch.zip