diff options
author | Yariv Livay <yarivlivay@gmail.com> | 2013-03-17 22:46:48 +0200 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2013-03-18 12:47:01 -0500 |
commit | a7a5f273e3765a819f7d2ac71b4be4dbd28f9db4 (patch) | |
tree | cc24b480e39c5346abb8d6c6632b318bb6cba23c /src/main/java/net/minecraft/server/ItemFireball.java | |
parent | 2e6cfdb3cc9147d49c050dbd21a6ae37c3a916dd (diff) | |
download | craftbukkit-a7a5f273e3765a819f7d2ac71b4be4dbd28f9db4.tar craftbukkit-a7a5f273e3765a819f7d2ac71b4be4dbd28f9db4.tar.gz craftbukkit-a7a5f273e3765a819f7d2ac71b4be4dbd28f9db4.tar.lz craftbukkit-a7a5f273e3765a819f7d2ac71b4be4dbd28f9db4.tar.xz craftbukkit-a7a5f273e3765a819f7d2ac71b4be4dbd28f9db4.zip |
Implement new cause versions of BlockIgniteEvent. Addresses BUKKIT-3609, BUKKIT-3656, BUKKIT-3657
Diffstat (limited to 'src/main/java/net/minecraft/server/ItemFireball.java')
-rw-r--r-- | src/main/java/net/minecraft/server/ItemFireball.java | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/main/java/net/minecraft/server/ItemFireball.java b/src/main/java/net/minecraft/server/ItemFireball.java index decf0216..81777fcf 100644 --- a/src/main/java/net/minecraft/server/ItemFireball.java +++ b/src/main/java/net/minecraft/server/ItemFireball.java @@ -1,10 +1,5 @@ package net.minecraft.server; -// CraftBukkit start -import org.bukkit.entity.Player; -import org.bukkit.event.block.BlockIgniteEvent; -// CraftBukkit end - public class ItemFireball extends Item { public ItemFireball(int i) { @@ -47,13 +42,7 @@ public class ItemFireball extends Item { if (i1 == 0) { // CraftBukkit start - org.bukkit.block.Block blockClicked = world.getWorld().getBlockAt(i, j, k); - Player thePlayer = (Player) entityhuman.getBukkitEntity(); - - BlockIgniteEvent eventIgnite = new BlockIgniteEvent(blockClicked, BlockIgniteEvent.IgniteCause.FIREBALL, thePlayer); - world.getServer().getPluginManager().callEvent(eventIgnite); - - if (eventIgnite.isCancelled()) { + if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, i, j, k, org.bukkit.event.block.BlockIgniteEvent.IgniteCause.FIREBALL, entityhuman).isCancelled()) { if (!entityhuman.abilities.canInstantlyBuild) { --itemstack.count; } |