Refactored material named nodes (modifyworld.blocks.destroy.stone). Now it used AND logic with numeric nodes instead of OR.

This mean you need destroy.stone AND destroy.1 to be actually able destroy stone.
This commit is contained in:
t3hk0d3 2011-08-25 00:26:42 +04:00
parent 66b226216d
commit 3c75fe61b0

View File

@ -109,15 +109,7 @@ public abstract class ModifyworldListener implements Listener {
}
protected boolean canInteractWithMaterial(Player player, String basePermission, Material type) {
if (permissionsManager.has(player, basePermission + type.getId())) {
return true;
}
if (permissionsManager.has(player, basePermission + type.name().toLowerCase().replace("_", ""))) {
return true;
}
return false;
return permissionsManager.has(player, basePermission + type.name().toLowerCase().replace("_", "")) && permissionsManager.has(player, basePermission + type.getId());
}
private void registerEvents(Plugin plugin) {