diff options
author | feildmaster <admin@feildmaster.com> | 2012-12-20 10:45:12 -0600 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2012-12-20 10:52:44 -0600 |
commit | 686807e387f47869c60983301050caaa069a7a82 (patch) | |
tree | f5badc1c151dc34c906757b26db025624a8c9518 /src/main | |
parent | 23b67643741d5754af4de020a29d557078f9f81d (diff) | |
download | craftbukkit-686807e387f47869c60983301050caaa069a7a82.tar craftbukkit-686807e387f47869c60983301050caaa069a7a82.tar.gz craftbukkit-686807e387f47869c60983301050caaa069a7a82.tar.lz craftbukkit-686807e387f47869c60983301050caaa069a7a82.tar.xz craftbukkit-686807e387f47869c60983301050caaa069a7a82.zip |
Filter invalid ItemStacks from Packets.
Invalid ItemStacks are causing Fireworks to disconnect players and
prevent them from reconnecting
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/net/minecraft/server/Packet.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/Packet.java b/src/main/java/net/minecraft/server/Packet.java index a754da98..7472d441 100644 --- a/src/main/java/net/minecraft/server/Packet.java +++ b/src/main/java/net/minecraft/server/Packet.java @@ -210,7 +210,7 @@ public abstract class Packet { } public static void a(ItemStack itemstack, DataOutputStream dataoutputstream) throws IOException { // CraftBukkit - throws IOException - if (itemstack == null) { + if (itemstack == null || itemstack.getItem() == null) { // CraftBukkit - NPE fix itemstack.getItem() dataoutputstream.writeShort(-1); } else { dataoutputstream.writeShort(itemstack.id); |