mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
Fixes #1438 (unless other things call this event)
This commit is contained in:
@ -807,7 +807,17 @@ public class PlayerEvents extends PlotListener implements Listener {
|
||||
if (!PS.get().hasPlotArea(world)) {
|
||||
return;
|
||||
}
|
||||
if (BukkitUtil.getLocation(event.getBlock().getLocation()).getPlotArea() != null) {
|
||||
Location location = BukkitUtil.getLocation(event.getBlock().getLocation());
|
||||
PlotArea area = location.getPlotArea();
|
||||
if (area == null) {
|
||||
return;
|
||||
}
|
||||
Plot plot = area.getOwnedPlot(location);
|
||||
if (plot == null) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
if (!Flags.FROST_WALKER.isTrue(plot)) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user