mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Filter invalid ItemStacks from Packets.
Invalid ItemStacks are causing Fireworks to disconnect players and prevent them from reconnecting
This commit is contained in:
1 parent
23b6764374
commit
686807e387
1 file changed
+1
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user