1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-07 07:06:41 +02:00

Add new permission essentials.protect.alerts.notrigger

If user has this permisson they do not trigger EssProtect block alerts
This commit is contained in:
ementalo
2012-01-23 15:48:56 +00:00
parent 84fc2887e3
commit 3b935a2628
2 changed files with 5 additions and 2 deletions

View File

@@ -51,7 +51,8 @@ public class EssentialsProtectBlockListener implements Listener
return;
}
if (prot.checkProtectionItems(ProtectConfig.alert_on_placement, id))
if (!user.hasPermission("essentials.protect.alerts.notrigger")
&& prot.checkProtectionItems(ProtectConfig.alert_on_placement, id))
{
prot.getEssentialsConnect().alert(user, blockPlaced.getType().toString(), _("alertPlaced"));
}
@@ -249,7 +250,8 @@ public class EssentialsProtectBlockListener implements Listener
}
final Material type = block.getType();
if (prot.checkProtectionItems(ProtectConfig.alert_on_break, typeId))
if (!user.hasPermission("essentials.protect.alerts.notrigger")
&& prot.checkProtectionItems(ProtectConfig.alert_on_break, typeId))
{
prot.getEssentialsConnect().alert(user, type.toString(), _("alertBroke"));
}

View File

@@ -83,6 +83,7 @@ public class EssentialsProtectPlayerListener implements Listener
}
}
if (item != null
&& !user.hasPermission("essentials.protect.alerts.notrigger")
&& prot.checkProtectionItems(ProtectConfig.alert_on_use, item.getTypeId()))
{
prot.getEssentialsConnect().alert(user, item.getType().toString(), _("alertUsed"));