diff options
author | ementalo <suror@gmx.co.uk> | 2012-01-23 16:00:23 +0000 |
---|---|---|
committer | ementalo <suror@gmx.co.uk> | 2012-01-23 16:00:23 +0000 |
commit | 01a37df70070f50995e0314fc1af222b633af261 (patch) | |
tree | 77098cc0db9f18df5c07ceca2cb5ef8a85076bb1 | |
parent | f0dd81ee000b333b2aca59b9949518c7686cceb1 (diff) | |
download | Essentials-01a37df70070f50995e0314fc1af222b633af261.tar Essentials-01a37df70070f50995e0314fc1af222b633af261.tar.gz Essentials-01a37df70070f50995e0314fc1af222b633af261.tar.lz Essentials-01a37df70070f50995e0314fc1af222b633af261.tar.xz Essentials-01a37df70070f50995e0314fc1af222b633af261.zip |
Add new permission essentials.protect.alerts.notrigger
If user has this permisson they do not trigger EssProtect block alerts
Fix spawnmob sign command args
3 files changed, 6 insertions, 4 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java index 1d90384c1..0e3fb6a5e 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java @@ -51,7 +51,8 @@ public class EssentialsProtectBlockListener extends BlockListener return; } - if (settings.getData().getAlertOnPlacement().contains(blockPlaced.getType())) + if (!user.hasPermission("essentials.protect.alerts.notrigger") && + settings.getData().getAlertOnPlacement().contains(blockPlaced.getType())) { prot.getEssentialsConnect().alert(user, blockPlaced.getType().toString(), _("alertPlaced")); } @@ -284,7 +285,7 @@ public class EssentialsProtectBlockListener extends BlockListener { final Material type = block.getType(); - if (settings.getData().getAlertOnBreak().contains(type)) + if (!user.hasPermission("essentials.protect.alerts.notrigger") && settings.getData().getAlertOnBreak().contains(type)) { prot.getEssentialsConnect().alert(user, type.toString(), _("alertBroke")); } diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java index 5e6da11cc..b5c7980c2 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java @@ -84,7 +84,8 @@ public class EssentialsProtectPlayerListener extends PlayerListener } } if (item != null - && settings.getData().getAlertOnUse().contains(item.getType())) + && !user.hasPermission("essentials.protect.alerts.notrigger") + && settings.getData().getAlertOnUse().contains(item.getType())) { prot.getEssentialsConnect().alert(user, item.getType().toString(), _("alertUsed")); } diff --git a/EssentialsSigns/src/com/earth2me/essentials/signs/SignSpawnmob.java b/EssentialsSigns/src/com/earth2me/essentials/signs/SignSpawnmob.java index 58383782b..4c6d1238a 100644 --- a/EssentialsSigns/src/com/earth2me/essentials/signs/SignSpawnmob.java +++ b/EssentialsSigns/src/com/earth2me/essentials/signs/SignSpawnmob.java @@ -37,7 +37,7 @@ public class SignSpawnmob extends EssentialsSign }; try { - command.run(player, args); + command.run(player, "spawnmob", args); } catch (Exception ex) { |