mirror of
https://github.com/kaboomserver/extras.git
synced 2024-11-23 16:08:18 -05:00
Liquid optimizations
This commit is contained in:
parent
4683cf3163
commit
6e50d3d8d1
2 changed files with 13 additions and 0 deletions
|
@ -211,6 +211,17 @@ class Events implements Listener {
|
|||
}
|
||||
} else if (block.getType() == Material.SOIL) {
|
||||
event.setCancelled(true);
|
||||
} else if (block.getType() == Material.STATIONARY_WATER ||
|
||||
block.getType() == Material.STATIONARY_LAVA) {
|
||||
if (block.getRelative(BlockFace.UP).getType() == block.getType()) {
|
||||
if (block.getRelative(BlockFace.DOWN).getType() != Material.AIR &&
|
||||
block.getRelative(BlockFace.NORTH).getType() != Material.AIR &&
|
||||
block.getRelative(BlockFace.SOUTH).getType() != Material.AIR &&
|
||||
block.getRelative(BlockFace.WEST).getType() != Material.AIR &&
|
||||
block.getRelative(BlockFace.EAST).getType() != Material.AIR) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
} else if (main.nonSolidWallMountedBlockList.contains(block.getType())) {
|
||||
World world = event.getBlock().getWorld();
|
||||
int radius = 5;
|
||||
|
|
|
@ -19,6 +19,8 @@ import org.bukkit.Bukkit;
|
|||
import org.bukkit.Color;
|
||||
import org.bukkit.Material;
|
||||
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
|
Loading…
Reference in a new issue