mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-02 22:47:43 +01:00
Added protection for buttons
This commit is contained in:
parent
39ddc4eef8
commit
4c46e1778f
@ -1720,9 +1720,23 @@ public class IslandGuard implements Listener {
|
||||
break;
|
||||
case STONE_BUTTON:
|
||||
case WOOD_BUTTON:
|
||||
if (island == null) {
|
||||
if (Settings.defaultWorldSettings.get(SettingsFlag.BUTTON)) {
|
||||
return;
|
||||
} else {
|
||||
Util.sendMessage(e.getPlayer(), plugin.getLocale(e.getPlayer().getUniqueId()).get("island.protected"));
|
||||
e.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!island.getFlag(SettingsFlag.LEVER)) {
|
||||
Util.sendMessage(e.getPlayer(), plugin.getLocale(e.getPlayer().getUniqueId()).get("island.protected"));
|
||||
e.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case LEVER:
|
||||
if (island == null) {
|
||||
// TODO: BUTTON?
|
||||
if (Settings.defaultWorldSettings.get(SettingsFlag.LEVER)) {
|
||||
return;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user