Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 32 lines 761 B view raw
1package org.bukkit.event.entity; 2 3import org.bukkit.Location; 4import org.bukkit.entity.Entity; 5import org.bukkit.event.Cancellable; 6 7public class ItemDespawnEvent extends EntityEvent implements Cancellable { 8 private boolean canceled; 9 private Location location; 10 11 public ItemDespawnEvent(Entity spawnee, Location loc) { 12 super(Type.ITEM_DESPAWN, spawnee); 13 location = loc; 14 } 15 16 public boolean isCancelled() { 17 return canceled; 18 } 19 20 public void setCancelled(boolean cancel) { 21 canceled = cancel; 22 } 23 24 /** 25 * Gets the location at which the item is despawning. 26 * 27 * @return The location at which the item is despawning 28 */ 29 public Location getLocation() { 30 return location; 31 } 32}