1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-15 11:04:29 +02:00

Add new permission essentials.protect.alerts.notrigger

If user has this permisson they do not trigger EssProtect block alerts
Fix spawnmob sign command args
This commit is contained in:
ementalo
2012-01-23 16:00:23 +00:00
parent f0dd81ee00
commit 01a37df700
3 changed files with 6 additions and 4 deletions

View File

@@ -51,7 +51,8 @@ public class EssentialsProtectBlockListener extends BlockListener
return; 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")); prot.getEssentialsConnect().alert(user, blockPlaced.getType().toString(), _("alertPlaced"));
} }
@@ -284,7 +285,7 @@ public class EssentialsProtectBlockListener extends BlockListener
{ {
final Material type = block.getType(); 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")); prot.getEssentialsConnect().alert(user, type.toString(), _("alertBroke"));
} }

View File

@@ -84,7 +84,8 @@ public class EssentialsProtectPlayerListener extends PlayerListener
} }
} }
if (item != null 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")); prot.getEssentialsConnect().alert(user, item.getType().toString(), _("alertUsed"));
} }

View File

@@ -37,7 +37,7 @@ public class SignSpawnmob extends EssentialsSign
}; };
try try
{ {
command.run(player, args); command.run(player, "spawnmob", args);
} }
catch (Exception ex) catch (Exception ex)
{ {