summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
diff options
context:
space:
mode:
authorEvilSeph <evilseph@gmail.com>2011-10-01 00:15:45 -0400
committerEvilSeph <evilseph@gmail.com>2011-10-01 01:40:08 -0400
commitd53a155e4c3c75ed5bf797d75e8df63dd59f1f59 (patch)
tree1f854466ded7381cea83b6822919fe7b378e4973 /src/main/java/net/minecraft/server
parentaa6685111980454cdf70b48b653f3065f5c2fdf1 (diff)
downloadcraftbukkit-d53a155e4c3c75ed5bf797d75e8df63dd59f1f59.tar
craftbukkit-d53a155e4c3c75ed5bf797d75e8df63dd59f1f59.tar.gz
craftbukkit-d53a155e4c3c75ed5bf797d75e8df63dd59f1f59.tar.lz
craftbukkit-d53a155e4c3c75ed5bf797d75e8df63dd59f1f59.tar.xz
craftbukkit-d53a155e4c3c75ed5bf797d75e8df63dd59f1f59.zip
Packet handling improvements.
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r--src/main/java/net/minecraft/server/NetServerHandler.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java
index 0f4dcf10..d688b93c 100644
--- a/src/main/java/net/minecraft/server/NetServerHandler.java
+++ b/src/main/java/net/minecraft/server/NetServerHandler.java
@@ -463,7 +463,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
}
if (this.player.itemInWorldManager.b()) {
- flag1 = false;
+ flag1 = true; // CraftBukkit - false -> true
}
int i = packet14blockdig.a;
@@ -681,10 +681,11 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
}
public void a(Packet16BlockItemSwitch packet16blockitemswitch) {
- if (this.player.dead) return; // CraftBukkit
+ // CraftBukkit start
+ if (this.player.dead) return;
- if (packet16blockitemswitch.itemInHandIndex >= 0 && packet16blockitemswitch.itemInHandIndex <= InventoryPlayer.g()) {
- // CraftBukkit start
+ // Changed <= to <
+ if (packet16blockitemswitch.itemInHandIndex >= 0 && packet16blockitemswitch.itemInHandIndex < InventoryPlayer.g()) {
PlayerItemHeldEvent event = new PlayerItemHeldEvent(this.getPlayer(), this.player.inventory.itemInHandIndex, packet16blockitemswitch.itemInHandIndex);
this.server.getPluginManager().callEvent(event);
// CraftBukkit end
@@ -763,7 +764,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
}
// CraftBukkit end
- /* CraftBukkit start - No longer neaded av we have already handled it server.dispatchCommand above.
+ /* CraftBukkit start - No longer neaded as we have already handled it in server.dispatchCommand above.
if (s.toLowerCase().startsWith("/me ")) {
s = "* " + this.player.name + " " + s.substring(s.indexOf(" ")).trim();
a.info(s);