use of org.bukkit.event.entity.EntityUnleashEvent in project Glowstone by GlowstoneMC.
the class GlowEntity method unleash.
// //////////////////////////////////////////////////////////////////////////
// Miscellaneous actions
private void unleash(GlowEntity entity, UnleashReason reason) {
EventFactory.getInstance().callEvent(new EntityUnleashEvent(entity, reason));
world.dropItemNaturally(entity.location, new ItemStack(Material.LEAD));
entity.setLeashHolder(null);
}
Aggregations