mirror of
https://github.com/PEXPlugins/Modifyworld.git
synced 2024-11-16 10:35:32 +01:00
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:
parent
66b226216d
commit
3c75fe61b0
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user