summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r--src/main/java/net/minecraft/server/EntityArrow.java1
-rw-r--r--src/main/java/net/minecraft/server/EntityItem.java1
-rw-r--r--src/main/java/net/minecraft/server/EntityLiving.java4
3 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index 8b39b7ba..fdad5657 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -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()) {
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;
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index c36c25b2..458e44f0 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -82,11 +82,11 @@ public abstract class EntityLiving extends Entity {
private ChunkCoordinates bP = new ChunkCoordinates(0, 0, 0);
private float bQ = -1.0F;
private ItemStack[] equipment = new ItemStack[5];
- protected float[] dropChances = new float[5];
+ public float[] dropChances = new float[5]; // CraftBukkit - protected -> public
private ItemStack[] bS = new ItemStack[5];
public boolean bp = false;
public int bq = 0;
- protected boolean canPickUpLoot = false;
+ public boolean canPickUpLoot = false; // CraftBukkit - protected -> public
public boolean persistent = !this.bj(); // CraftBukkit - private -> public, change value
protected int bs;
protected double bt;