mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Fixes #772
This commit is contained in:
parent
163ccc9eae
commit
dd4a1faede
@ -384,7 +384,15 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
|||||||
}
|
}
|
||||||
if (pattern.matcher(msg).matches()) {
|
if (pattern.matcher(msg).matches()) {
|
||||||
MainUtil.sendMessage(pp, C.COMMAND_BLOCKED);
|
MainUtil.sendMessage(pp, C.COMMAND_BLOCKED);
|
||||||
event.setCancelled(true);
|
String perm;
|
||||||
|
if (plot.isAdded(pp.getUUID())) {
|
||||||
|
perm = "plots.admin.command.blocked-cmds.shared";
|
||||||
|
} else {
|
||||||
|
perm = "plots.admin.command.blocked-cmds.other";
|
||||||
|
}
|
||||||
|
if (!Permissions.hasPermission(pp, perm)) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user