Skip to content

Commit

Permalink
Fixed incorrect detection logged water blocks (#1312)
Browse files Browse the repository at this point in the history
  • Loading branch information
OmerBenGera committed Aug 12, 2022
1 parent fff47da commit b8fa217
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -169,7 +169,8 @@ public boolean preventEntityExplosion(Entity source, Location explodeLocation) {

@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
private void onBlockFlow(BlockFromToEvent e) {
IslandFlag islandFlag = Materials.isWater(e.getBlock().getType()) ? IslandFlags.WATER_FLOW : IslandFlags.LAVA_FLOW;
IslandFlag islandFlag = Materials.isWater(e.getBlock().getType()) ||
plugin.getNMSWorld().isWaterLogged(e.getBlock()) ? IslandFlags.WATER_FLOW : IslandFlags.LAVA_FLOW;
if (preventAction(e.getToBlock().getLocation(), islandFlag))
e.setCancelled(true);
}
Expand Down

0 comments on commit b8fa217

Please sign in to comment.