mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
/p weanywhere change
Allows players with "WorldEdit Anywhere" toggled to use the wand anywhere
This commit is contained in:
parent
015dda21f2
commit
712ce74af6
@ -615,6 +615,11 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
||||
if (Permissions.hasPermission(pp, C.PERMISSION_ADMIN_DESTROY_ROAD)) {
|
||||
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);
|
||||
event.setCancelled(true);
|
||||
}
|
||||
@ -1165,6 +1170,11 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
|
||||
default:
|
||||
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)) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user