diff options
author | James Logsdon <dwarf@girsbrain.org> | 2011-02-11 16:49:47 -0500 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2011-02-12 01:39:44 +0100 |
commit | 6c86db411c79e36fe78624c3506b1a784d6ba620 (patch) | |
tree | 7246637afc6cff2dddcfd65ae5754370104d4139 | |
parent | 49ced273118f3a7369f67cda8f8d7540809a3578 (diff) | |
download | bukkit-6c86db411c79e36fe78624c3506b1a784d6ba620.tar bukkit-6c86db411c79e36fe78624c3506b1a784d6ba620.tar.gz bukkit-6c86db411c79e36fe78624c3506b1a784d6ba620.tar.lz bukkit-6c86db411c79e36fe78624c3506b1a784d6ba620.tar.xz bukkit-6c86db411c79e36fe78624c3506b1a784d6ba620.zip |
Cleaning up PlayerDropItemEvent
-rw-r--r-- | src/main/java/org/bukkit/event/player/PlayerDropItemEvent.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/main/java/org/bukkit/event/player/PlayerDropItemEvent.java b/src/main/java/org/bukkit/event/player/PlayerDropItemEvent.java index 0980c2c3..4792b03c 100644 --- a/src/main/java/org/bukkit/event/player/PlayerDropItemEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerDropItemEvent.java @@ -1,9 +1,9 @@ - package org.bukkit.event.player; import org.bukkit.entity.ItemDrop; import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; +import org.bukkit.event.Event; /** * Thrown when a player drops an item from their inventory @@ -12,8 +12,8 @@ public class PlayerDropItemEvent extends PlayerEvent implements Cancellable { private final ItemDrop drop; private boolean cancel = false; - public PlayerDropItemEvent(final Type type, final Player player, final ItemDrop drop) { - super(type, player); + public PlayerDropItemEvent(final Player player, final ItemDrop drop) { + super(Event.Type.PLAYER_DROP_ITEM, player); this.drop = drop; } @@ -30,6 +30,10 @@ public class PlayerDropItemEvent extends PlayerEvent implements Cancellable { * Gets the cancellation state of this event. A cancelled event will not * be executed in the server, but will still pass to other plugins * + * If an item drop event is cancelled, the item will not be dropped and it + * will be added back to the players inventory. + * This will not fire an event. + * * @return true if this event is cancelled */ public boolean isCancelled() { @@ -40,6 +44,10 @@ public class PlayerDropItemEvent extends PlayerEvent implements Cancellable { * Sets the cancellation state of this event. A cancelled event will not * be executed in the server, but will still pass to other plugins * + * If an item drop event is cancelled, the item will not be dropped and it + * will be added back to the players inventory. + * This will not fire an event. + * * @param cancel true if you wish to cancel this event */ public void setCancelled(boolean cancel) { |