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

This commit is contained in:
durron597 committed 2011-01-08 06:18:05 -05:00
1 parent 65c8df24b6
commit fab66092e2
10 files changed
+417 -3

No files matched your search

@@ -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!