mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-24 11:54:35 +08: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:
parent
4b61ac9043
commit
f93769dd1d
@ -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"));
|
||||
}
|
||||
|
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user