mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-29 08:36:45 +01:00
Fixes #1438 (unless other things call this event)
This commit is contained in:
parent
a3c1ad3ec8
commit
81418b07a8
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -54,6 +54,7 @@ public final class Flags {
|
||||
public static final BooleanFlag ICE_MELT = new BooleanFlag("ice-melt");
|
||||
public static final BooleanFlag FIRE_SPREAD = new BooleanFlag("fire-spread");
|
||||
public static final BooleanFlag BLOCK_BURN = new BooleanFlag("block-burn");
|
||||
public static final BooleanFlag FROST_WALKER = new BooleanFlag("frost-walker");
|
||||
public static final BooleanFlag BLOCK_IGNITION = new BooleanFlag("block-ignition");
|
||||
public static final BooleanFlag SOIL_DRY = new BooleanFlag("soil-dry");
|
||||
public static final StringListFlag BLOCKED_CMDS = new StringListFlag("blocked-cmds");
|
||||
|
Loading…
Reference in New Issue
Block a user