44 lines
1.0 KiB
Java
44 lines
1.0 KiB
Java
package org.bukkit.event.entity;
|
|
|
|
import org.bukkit.Location;
|
|
import org.bukkit.entity.Entity;
|
|
import org.bukkit.event.Cancellable;
|
|
import org.bukkit.event.HandlerList;
|
|
|
|
public class ItemDespawnEvent extends EntityEvent implements Cancellable {
|
|
private static final HandlerList handlers = new HandlerList();
|
|
private boolean canceled;
|
|
private final Location location;
|
|
|
|
public ItemDespawnEvent(final Entity spawnee, final Location loc) {
|
|
super(spawnee);
|
|
location = loc;
|
|
}
|
|
|
|
public boolean isCancelled() {
|
|
return canceled;
|
|
}
|
|
|
|
public void setCancelled(boolean cancel) {
|
|
canceled = cancel;
|
|
}
|
|
|
|
/**
|
|
* Gets the location at which the item is despawning.
|
|
*
|
|
* @return The location at which the item is despawning
|
|
*/
|
|
public Location getLocation() {
|
|
return location;
|
|
}
|
|
|
|
@Override
|
|
public HandlerList getHandlers() {
|
|
return handlers;
|
|
}
|
|
|
|
public static HandlerList getHandlerList() {
|
|
return handlers;
|
|
}
|
|
}
|