diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java index b9ca7d3703..a141c7f0a5 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -648,7 +648,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.deathTicks = 0; effects.clear(); this.activeContainer = this.defaultContainer; - this.lastSentExp = -1; // lastSentExp. Find line: "if (this.expTotal != this.XXXX) {" + this.lastSentExp = -1; if(this.keepLevel) { this.exp = exp; } else { diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index ecdad7daa3..9f98355e30 100644 --- a/src/main/java/net/minecraft/server/NetServerHandler.java +++ b/src/main/java/net/minecraft/server/NetServerHandler.java @@ -923,9 +923,10 @@ public class NetServerHandler extends NetHandler implements ICommandListener { this.player.updateInventory(this.player.activeContainer); } } else if (packet7useentity.c == 1) { - if (entity instanceof EntityItem) { - disconnect("Attacking an item is not permitted"); - System.out.println("Player " + player.name + " tried to attack an item entity, so I have disconnected them for exploiting."); + if ((entity instanceof EntityItem) || (entity instanceof EntityExperienceOrb) || (entity instanceof EntityArrow)) { + String type = entity.getClass().getSimpleName(); + disconnect("Attacking an " + type + " is not permitted"); + System.out.println("Player " + player.name + " tried to attack an " + type + ", so I have disconnected them for exploiting."); return; }