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:
@@ -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"));
|
||||
}
|
||||
|
@@ -84,6 +84,7 @@ public class EssentialsProtectPlayerListener extends PlayerListener
|
||||
}
|
||||
}
|
||||
if (item != null
|
||||
&& !user.hasPermission("essentials.protect.alerts.notrigger")
|
||||
&& settings.getData().getAlertOnUse().contains(item.getType()))
|
||||
{
|
||||
prot.getEssentialsConnect().alert(user, item.getType().toString(), _("alertUsed"));
|
||||
|
@@ -37,7 +37,7 @@ public class SignSpawnmob extends EssentialsSign
|
||||
};
|
||||
try
|
||||
{
|
||||
command.run(player, args);
|
||||
command.run(player, "spawnmob", args);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
Reference in New Issue
Block a user