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
This commit is contained in:
feildmaster
2012-12-09 00:09:48 -06:00
parent 684ba31c39
commit 430d352a5a
7 changed files with 213 additions and 3 deletions

View File

@@ -370,6 +370,7 @@ public class EntityArrow extends Entity implements IProjectile {
EntityItem item = new EntityItem(this.world, this.locX, this.locY, this.locZ, itemstack);
PlayerPickupItemEvent event = new PlayerPickupItemEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), new org.bukkit.craftbukkit.entity.CraftItem(this.world.getServer(), this, item), 0);
event.setCancelled(!entityhuman.canPickUpLoot);
this.world.getServer().getPluginManager().callEvent(event);
if (event.isCancelled()) {