mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
Add liquid-flow flag
This commit is contained in:
parent
a2ca9a52ea
commit
3fabfa10d7
@ -898,8 +898,19 @@ public class PlayerEvents extends PlotListener implements Listener {
|
||||
if (plot != null) {
|
||||
if (Flags.DISABLE_PHYSICS.isFalse(plot)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
} else if (!area.contains(fLocation.getX(), fLocation.getZ()) || !Objects.equals(plot, area.getOwnedPlot(fLocation))) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
if (Flags.LIQUID_FLOW.isFalse(plot)) {
|
||||
switch (to.getType()) {
|
||||
case WATER:
|
||||
case STATIONARY_WATER:
|
||||
case LAVA:
|
||||
case STATIONARY_LAVA:
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
} else if (!area.contains(fLocation.getX(), fLocation.getZ()) || !Objects.equals(plot, area.getOwnedPlot(fLocation))) {
|
||||
event.setCancelled(true);
|
||||
|
@ -47,6 +47,7 @@ public final class Flags {
|
||||
public static final BooleanFlag VINE_GROW = new BooleanFlag("vine-grow");
|
||||
public static final BooleanFlag MYCEL_GROW = new BooleanFlag("mycel-grow");
|
||||
public static final BooleanFlag DISABLE_PHYSICS = new BooleanFlag("disable-physics");
|
||||
public static final BooleanFlag LIQUID_FLOW = new BooleanFlag("liquid-flow");
|
||||
public static final BooleanFlag SNOW_MELT = new BooleanFlag("snow-melt");
|
||||
public static final BooleanFlag ICE_MELT = new BooleanFlag("ice-melt");
|
||||
public static final BooleanFlag FIRE_SPREAD = new BooleanFlag("fire-spread");
|
||||
|
Loading…
Reference in New Issue
Block a user