summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/net/minecraft/server/EntityItem.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index f7b55c7c..529dd327 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -127,12 +127,12 @@ public class EntityItem extends Entity {
int i = this.itemStack.count;
// CraftBukkit start
- if (this.pickupDelay <= 0) { // <-- == to <=
+ if (this.pickupDelay <= 0 && entityhuman.inventory.canHold(this.itemStack)) { // <-- == to <=
Player player = (Player) entityhuman.getBukkitEntity();
PlayerPickupItemEvent event = new PlayerPickupItemEvent(player, (org.bukkit.entity.Item) this.getBukkitEntity());
- ((WorldServer) world).getServer().getPluginManager().callEvent(event);
+ world.getServer().getPluginManager().callEvent(event);
- if (event.isCancelled() || !entityhuman.inventory.canHold(this.itemStack)) {
+ if (event.isCancelled()) {
return;
}
// CraftBukkit end