diff options
author | TomyLobo <tomylobo@nurfuerspam.de> | 2012-02-21 13:51:56 +0100 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-02-29 00:12:26 -0500 |
commit | 92dfb2500b68de14bc9b873f7d5821090af9bac0 (patch) | |
tree | 299f241b2365cc9cdc954461323a233f98551321 /src/main/java/net/minecraft/server/FoodMetaData.java | |
parent | dcf016822dc84146ee62cc2646d51673b0466706 (diff) | |
download | craftbukkit-92dfb2500b68de14bc9b873f7d5821090af9bac0.tar craftbukkit-92dfb2500b68de14bc9b873f7d5821090af9bac0.tar.gz craftbukkit-92dfb2500b68de14bc9b873f7d5821090af9bac0.tar.lz craftbukkit-92dfb2500b68de14bc9b873f7d5821090af9bac0.tar.xz craftbukkit-92dfb2500b68de14bc9b873f7d5821090af9bac0.zip |
Adjusted CraftBukkit to work with the entity event convenience patch in Bukkit. Addresses BUKKIT-809
Diffstat (limited to 'src/main/java/net/minecraft/server/FoodMetaData.java')
-rw-r--r-- | src/main/java/net/minecraft/server/FoodMetaData.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java index e6f5c2f0..66bb10b3 100644 --- a/src/main/java/net/minecraft/server/FoodMetaData.java +++ b/src/main/java/net/minecraft/server/FoodMetaData.java @@ -1,9 +1,6 @@ package net.minecraft.server; -// CraftBukkit start -import org.bukkit.event.entity.EntityDamageEvent; -import org.bukkit.event.entity.FoodLevelChangeEvent; -// CraftBukkit end +import org.bukkit.event.entity.EntityDamageEvent; // CraftBukkit public class FoodMetaData { @@ -36,8 +33,7 @@ public class FoodMetaData { this.saturationLevel = Math.max(this.saturationLevel - 1.0F, 0.0F); } else if (i > 0) { // CraftBukkit start - FoodLevelChangeEvent event = new FoodLevelChangeEvent(entityhuman.getBukkitEntity(), Math.max(this.foodLevel - 1, 0)); - entityhuman.world.getServer().getPluginManager().callEvent(event); + org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(entityhuman, Math.min(this.foodLevel - 1, 0)); if (!event.isCancelled()) { this.foodLevel = event.getFoodLevel(); |