Add liquid-flow flag

This commit is contained in:
Jesse Boyd
2016-06-20 22:47:57 +10:00
parent a2ca9a52ea
commit 3fabfa10d7
2 changed files with 12 additions and 0 deletions

View File

@ -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);