Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 35 lines 823 B view raw
1package org.bukkit.event.player; 2 3import org.bukkit.entity.Item; 4import org.bukkit.entity.Player; 5import org.bukkit.event.Cancellable; 6 7/** 8 * Thrown when a player drops an item from their inventory 9 */ 10public class PlayerDropItemEvent extends PlayerEvent implements Cancellable { 11 private final Item drop; 12 private boolean cancel = false; 13 14 public PlayerDropItemEvent(final Player player, final Item drop) { 15 super(Type.PLAYER_DROP_ITEM, player); 16 this.drop = drop; 17 } 18 19 /** 20 * Gets the ItemDrop created by the player 21 * 22 * @return ItemDrop created by the player 23 */ 24 public Item getItemDrop() { 25 return drop; 26 } 27 28 public boolean isCancelled() { 29 return cancel; 30 } 31 32 public void setCancelled(boolean cancel) { 33 this.cancel = cancel; 34 } 35}