fixed ArrayIndexOutOfBoundsException

make WrappedPacketOutPlayerInfo#getPlayerInfo playerInfoArray big enough
This commit is contained in:
JesseUwU authored and GitHub committed 2023-01-01 22:37:13 +01:00
1 parent 6777809d1c
commit be7aca69ef
1 file changed
+1
@@ -127,6 +127,7 @@ public class WrappedPacketOutPlayerInfo extends WrappedPacket implements Sendabl
playerInfoArray[0] = new PlayerInfo(username, gameProfile, gameMode, ping);
} else {
List<Object> nmsPlayerInfoDataList = readList(0);
playerInfoArray = new PlayerInfo[nmsPlayerInfoDataList.size()];
for (int i = 0; i < nmsPlayerInfoDataList.size(); i++) {
Object nmsPlayerInfoData = nmsPlayerInfoDataList.get(i);
WrappedPacket nmsPlayerInfoDataWrapper = new WrappedPacket(new NMSPacket(nmsPlayerInfoData));