mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Prevent liquids from flowing out of block walls. Fixes #2598.
This commit is contained in:
parent
86ea69b65e
commit
c7de9379ad
@ -1432,6 +1432,13 @@ import java.util.regex.Pattern;
|
|||||||
} else if (!area.contains(fLocation.getX(), fLocation.getZ()) || !Objects
|
} else if (!area.contains(fLocation.getX(), fLocation.getZ()) || !Objects
|
||||||
.equals(null, area.getOwnedPlot(fLocation))) {
|
.equals(null, area.getOwnedPlot(fLocation))) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
} else if (event.getBlock().isLiquid()) {
|
||||||
|
final org.bukkit.Location location = event.getBlock().getLocation();
|
||||||
|
if (BukkitUtil.getPlot(location.clone().add(0, 0, 1)) != null ||
|
||||||
|
BukkitUtil.getPlot(location.clone().add(1, 0, 0)) != null ||
|
||||||
|
BukkitUtil.getPlot(location.clone().add(1, 0, 1)) != null) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user