diff options
author | feildmaster <admin@feildmaster.com> | 2012-12-09 00:09:48 -0600 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2012-12-10 19:01:50 -0600 |
commit | 430d352a5a3d1f8d83276f0af43065b49e3b9822 (patch) | |
tree | 6759e3d728c1c799a688eea7b3bffc772be4c1a1 /src/main/java/net/minecraft/server/EntityItem.java | |
parent | 684ba31c39560bc43d475332cda2a183e0ffa63a (diff) | |
download | craftbukkit-430d352a5a3d1f8d83276f0af43065b49e3b9822.tar craftbukkit-430d352a5a3d1f8d83276f0af43065b49e3b9822.tar.gz craftbukkit-430d352a5a3d1f8d83276f0af43065b49e3b9822.tar.lz craftbukkit-430d352a5a3d1f8d83276f0af43065b49e3b9822.tar.xz craftbukkit-430d352a5a3d1f8d83276f0af43065b49e3b9822.zip |
Add EntityEquipment API. Adds BUKKIT-3103
Adds:
- Getting/Setting equipment
- getting/setting drop rates
- getting/setting ability to pick up items
-- As an added feature, players with this flag start off with a canceled PlayerPickupItemEvent
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityItem.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityItem.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java index 93f93863..a1dca162 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -204,6 +204,7 @@ public class EntityItem extends Entity { if (this.pickupDelay <= 0 && canHold > 0) { this.itemStack.count = canHold; PlayerPickupItemEvent event = new PlayerPickupItemEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining); + event.setCancelled(!entityhuman.canPickUpLoot); this.world.getServer().getPluginManager().callEvent(event); this.itemStack.count = canHold + remaining; |