mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-01-13 02:10:17 +00:00
Merge pull request #986 from SynergyMC/testing
A small change to /p weanywhere's behavior
This commit is contained in:
commit
2e4f4d0064
1 changed files with 10 additions and 0 deletions
|
@ -615,6 +615,11 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
||||||
if (Permissions.hasPermission(pp, C.PERMISSION_ADMIN_DESTROY_ROAD)) {
|
if (Permissions.hasPermission(pp, C.PERMISSION_ADMIN_DESTROY_ROAD)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (PS.get().worldedit != null && pp.getAttribute("worldedit")) {
|
||||||
|
if (player.getItemInHand().getTypeId() == PS.get().worldedit.getConfiguration().wandItem) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_DESTROY_ROAD);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_DESTROY_ROAD);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
@ -1165,6 +1170,11 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (PS.get().worldedit != null && pp.getAttribute("worldedit")) {
|
||||||
|
if (player.getItemInHand().getTypeId() == PS.get().worldedit.getConfiguration().wandItem) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!EventUtil.manager.checkPlayerBlockEvent(pp, eventType, loc, lb, true)) {
|
if (!EventUtil.manager.checkPlayerBlockEvent(pp, eventType, loc, lb, true)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue