Fixed lack of calling callEvent(event), finished Item Use

This commit is contained in:
durron597
2011-01-08 06:18:05 -05:00
parent 65c8df24b6
commit fab66092e2
10 changed files with 417 additions and 3 deletions

View File

@@ -76,6 +76,7 @@ public class ItemBlock extends Item {
boolean canBuild = distanceFromSpawn > 16 || thePlayer.isOp();
BlockPlacedEvent bpe = new BlockPlacedEvent(Type.BLOCK_PLACED, placedBlock, blockClicked, itemInHand, thePlayer, canBuild);
((WorldServer) world).getServer().getPluginManager().callEvent(bpe);
if (bpe.isCancelled() || !bpe.canBuild()) {
// Craftbukkit Undo!