Fixed probable hardware info holder NPE.

This commit is contained in:
MobiusDevelopment 2021-08-07 00:35:27 +00:00
parent d5387bb853
commit a261be39a8
23 changed files with 138 additions and 46 deletions

View File

@ -695,9 +695,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -733,9 +733,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -733,9 +733,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -733,9 +733,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -739,9 +739,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -739,9 +739,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -739,9 +739,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -745,9 +745,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -762,9 +762,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -772,9 +772,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -772,9 +772,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -694,9 +694,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -693,9 +693,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -720,9 +720,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -720,9 +720,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -730,9 +730,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -730,9 +730,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -730,9 +730,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -734,9 +734,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -716,9 +716,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -768,9 +768,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -782,9 +782,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)

View File

@ -782,9 +782,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)