Fix block breaking

This commit is contained in:
Sam 2017-11-03 12:29:43 +00:00 committed by Alexander Meech
parent 9c7e83d5af
commit ea53d6a227

View File

@ -107,14 +107,14 @@ public class CakePlayerModule extends CakeModule
Block block = event.getBlock(); Block block = event.getBlock();
event.setCancelled(true);
if (UtilBlock.airFoliage(event.getBlock())) if (UtilBlock.airFoliage(event.getBlock()))
{ {
event.setCancelled(true);
block.setType(Material.AIR); block.setType(Material.AIR);
} }
else if (!_placedBlocks.contains(block)) else if (!_placedBlocks.contains(block))
{ {
event.setCancelled(true);
event.getPlayer().sendMessage(F.main("Game", "You cannot break blocks that have not been placed by players.")); event.getPlayer().sendMessage(F.main("Game", "You cannot break blocks that have not been placed by players."));
} }
} }