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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user