summaryrefslogtreecommitdiffstats
path: root/EssentialsProtect
diff options
context:
space:
mode:
authorementalo <suror@gmx.co.uk>2012-01-23 16:00:23 +0000
committerementalo <suror@gmx.co.uk>2012-01-23 16:00:23 +0000
commit01a37df70070f50995e0314fc1af222b633af261 (patch)
tree77098cc0db9f18df5c07ceca2cb5ef8a85076bb1 /EssentialsProtect
parentf0dd81ee000b333b2aca59b9949518c7686cceb1 (diff)
downloadEssentials-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
Diffstat (limited to 'EssentialsProtect')
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java5
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java3
2 files changed, 5 insertions, 3 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"));
}