[Bleeding] Implement ExpBottleEvent; Addresses BUKKIT-888

By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
CraftBukkit/Spigot 2012-03-20 02:07:13 -05:00
parent e1b4d5f3ae
commit e470617011

View File

@ -46,6 +46,7 @@ import org.bukkit.entity.Pig;
import org.bukkit.entity.PigZombie; import org.bukkit.entity.PigZombie;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile; import org.bukkit.entity.Projectile;
import org.bukkit.entity.ThrownExpBottle;
import org.bukkit.entity.ThrownPotion; import org.bukkit.entity.ThrownPotion;
import org.bukkit.event.Event; import org.bukkit.event.Event;
import org.bukkit.event.block.*; import org.bukkit.event.block.*;
@ -498,4 +499,11 @@ public class CraftEventFactory {
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
return event; return event;
} }
public static ExpBottleEvent callExpBottleEvent(Entity entity, int exp) {
ThrownExpBottle bottle = (ThrownExpBottle) entity.getBukkitEntity();
ExpBottleEvent event = new ExpBottleEvent(bottle, exp);
Bukkit.getPluginManager().callEvent(event);
return event;
}
} }