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,11 +695,15 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0; int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers()) for (PlayerInstance plr : World.getInstance().getPlayers())
{ {
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo))) if (plr.isOnlineInt() == 1)
{
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{ {
count++; count++;
} }
} }
}
if (count >= Config.MAX_PLAYERS_PER_HWID) if (count >= Config.MAX_PLAYERS_PER_HWID)
{ {
Disconnection.of(client).defaultSequence(false); Disconnection.of(client).defaultSequence(false);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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