mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
Prevent liquids from flowing out of block walls. Fixes #2598.
This commit is contained in:
parent
86ea69b65e
commit
c7de9379ad
1 changed files with 7 additions and 0 deletions
|
@ -1432,6 +1432,13 @@ import java.util.regex.Pattern;
|
|||
} else if (!area.contains(fLocation.getX(), fLocation.getZ()) || !Objects
|
||||
.equals(null, area.getOwnedPlot(fLocation))) {
|
||||
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 a new issue