This commit is contained in:
samczsun 2017-03-09 22:45:24 -05:00 committed by cnr
parent 63eed1abcd
commit 53d9a5f977

View File

@ -9,6 +9,8 @@ import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockFromToEvent;
import org.bukkit.event.block.BlockGrowEvent;
import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.block.BlockPlaceEvent;
import mineplex.core.common.util.MapUtil; import mineplex.core.common.util.MapUtil;
@ -107,12 +109,24 @@ public class Micro extends TeamGame
{ {
Block block = WorldData.World.getBlockAt(x, y, z); Block block = WorldData.World.getBlockAt(x, y, z);
if (block.getType() == Material.AIR || block.isLiquid()) if (block.getType() == Material.AIR)
continue; continue;
_blocks.add(block); _blocks.add(block);
} }
} }
@EventHandler
public void preventGrow(BlockGrowEvent event)
{
event.setCancelled(true);
}
@EventHandler
public void preventFlow(BlockFromToEvent event)
{
event.setCancelled(true);
}
@EventHandler @EventHandler
public void BlockPlace(BlockPlaceEvent event) public void BlockPlace(BlockPlaceEvent event)