diff options
author | Andre LeBlanc <andre@norcode.com> | 2013-03-13 01:34:01 -0400 |
---|---|---|
committer | Kane Y <kanepyork@gmail.com> | 2013-03-20 15:58:37 -0700 |
commit | 83e0e0770a4053c40a1febf26946e345a49a2898 (patch) | |
tree | d866a92291c4076e5f5e640f0b1d23197e717b53 /src/main/java/net/minecraft/server/EntityFishingHook.java | |
parent | ddec7117eedaccd04202326bec23c3837b57f9eb (diff) | |
download | craftbukkit-83e0e0770a4053c40a1febf26946e345a49a2898.tar craftbukkit-83e0e0770a4053c40a1febf26946e345a49a2898.tar.gz craftbukkit-83e0e0770a4053c40a1febf26946e345a49a2898.tar.lz craftbukkit-83e0e0770a4053c40a1febf26946e345a49a2898.tar.xz craftbukkit-83e0e0770a4053c40a1febf26946e345a49a2898.zip |
Add Fish (Hook) entity to PlayerFishEvent. Adds BUKKIT-1025
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityFishingHook.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityFishingHook.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java index a37ac26d..7a630116 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -4,6 +4,7 @@ import java.util.List; // CraftBukkit start import org.bukkit.entity.Player; +import org.bukkit.entity.Fish; import org.bukkit.event.player.PlayerFishEvent; // CraftBukkit end @@ -309,7 +310,7 @@ public class EntityFishingHook extends Entity { if (this.hooked != null) { // CraftBukkit start - PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.owner.getBukkitEntity(), this.hooked.getBukkitEntity(), PlayerFishEvent.State.CAUGHT_ENTITY); + PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.owner.getBukkitEntity(), this.hooked.getBukkitEntity(), (Fish) this.getBukkitEntity(), PlayerFishEvent.State.CAUGHT_ENTITY); this.world.getServer().getPluginManager().callEvent(playerFishEvent); if (playerFishEvent.isCancelled()) { @@ -332,7 +333,7 @@ public class EntityFishingHook extends Entity { } else if (this.au > 0) { EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY, this.locZ, new ItemStack(Item.RAW_FISH)); // CraftBukkit start - PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.owner.getBukkitEntity(), entityitem.getBukkitEntity(), PlayerFishEvent.State.CAUGHT_FISH); + PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.owner.getBukkitEntity(), entityitem.getBukkitEntity(), (Fish) this.getBukkitEntity(), PlayerFishEvent.State.CAUGHT_FISH); playerFishEvent.setExpToDrop(this.random.nextInt(6) + 1); this.world.getServer().getPluginManager().callEvent(playerFishEvent); @@ -361,7 +362,7 @@ public class EntityFishingHook extends Entity { if (this.h) { // CraftBukkit start - PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.owner.getBukkitEntity(), null, PlayerFishEvent.State.IN_GROUND); + PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.owner.getBukkitEntity(), null, (Fish) this.getBukkitEntity(), PlayerFishEvent.State.IN_GROUND); this.world.getServer().getPluginManager().callEvent(playerFishEvent); if (playerFishEvent.isCancelled()) { @@ -376,7 +377,7 @@ public class EntityFishingHook extends Entity { // CraftBukkit start if (b0 == 0) { - PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.owner.getBukkitEntity(), null, PlayerFishEvent.State.FAILED_ATTEMPT); + PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.owner.getBukkitEntity(), null, (Fish) this.getBukkitEntity(), PlayerFishEvent.State.FAILED_ATTEMPT); this.world.getServer().getPluginManager().callEvent(playerFishEvent); } // CraftBukkit end |