From 1363ecced80f568a3ef74e8388264dad0a58d3b3 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 10 Mar 2022 15:22:02 +0100 Subject: [PATCH] Hotfix NPE --- src/de/steamwar/bungeecore/comms/packets/FightEndsPacket.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/de/steamwar/bungeecore/comms/packets/FightEndsPacket.java b/src/de/steamwar/bungeecore/comms/packets/FightEndsPacket.java index cd9d4ea..5a6ec0d 100644 --- a/src/de/steamwar/bungeecore/comms/packets/FightEndsPacket.java +++ b/src/de/steamwar/bungeecore/comms/packets/FightEndsPacket.java @@ -26,6 +26,7 @@ import de.steamwar.bungeecore.comms.PacketIdManager; import lombok.AllArgsConstructor; import lombok.Getter; +import java.util.ArrayList; import java.util.List; @AllArgsConstructor @@ -43,10 +44,12 @@ public class FightEndsPacket extends BungeePacket { blueSchem = byteArrayDataInput.readInt(); redSchem = byteArrayDataInput.readInt(); int blueSize = byteArrayDataInput.readInt(); + bluePlayers = new ArrayList<>(blueSize); for (int i = 0; i < blueSize; i++) { bluePlayers.add(byteArrayDataInput.readInt()); } int redSize = byteArrayDataInput.readInt(); + redPlayers = new ArrayList<>(redSize); for (int i = 0; i < redSize; i++) { redPlayers.add(byteArrayDataInput.readInt()); }