Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
1package org.bukkit.event.entity;
2
3import org.bukkit.Location;
4import org.bukkit.entity.Entity;
5import org.bukkit.event.Cancellable;
6
7/**
8 * Called when an item is spawned into a world
9 */
10public class ItemSpawnEvent extends EntityEvent implements Cancellable {
11
12 private Location location;
13 private boolean canceled;
14
15 public ItemSpawnEvent(Entity spawnee, Location loc) {
16 super(Type.ITEM_SPAWN, spawnee);
17 this.location = loc;
18 }
19
20 public boolean isCancelled() {
21 return canceled;
22 }
23
24 public void setCancelled(boolean cancel) {
25 canceled = cancel;
26 }
27
28 /**
29 * Gets the location at which the item is spawning.
30 *
31 * @return The location at which the item is spawning
32 */
33 public Location getLocation() {
34 return location;
35 }
36}