mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
parent
2b561f2efa
commit
c891abce09
@ -817,6 +817,27 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Entity entity = event.getEntity();
|
||||||
|
if (entity instanceof Player) {
|
||||||
|
Player player = (Player) entity;
|
||||||
|
if (!plot.hasOwner()) {
|
||||||
|
PlotPlayer plotPlayer = BukkitUtil.getPlayer(player);
|
||||||
|
if (Flags.ICE_FORM.isTrue(plot)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
PlotPlayer plotPlayer = BukkitUtil.getPlayer(player);
|
||||||
|
if (!plot.isAdded(plotPlayer.getUUID())) {
|
||||||
|
if (Flags.ICE_FORM.isTrue(plot)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!Flags.ICE_FORM.isTrue(plot)) {
|
if (!Flags.ICE_FORM.isTrue(plot)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user