Check that the game is null before trying to get the kit name

This commit is contained in:
Sam 2017-11-22 23:07:59 +00:00 committed by Alexander Meech
parent c290f59752
commit 523f9b47b9

View File

@ -528,26 +528,11 @@ public abstract class LobbyManager implements Listener, IPacketHandler
String entityName = ent.GetKit().GetName(); String entityName = ent.GetKit().GetName();
if (!player.isOnline() || client == null || donor == null) if (!player.isOnline() || client == null || donor == null || game == null)
{ {
return entityName; return entityName;
} }
if (client.getPrimaryGroup() == null)
{
System.out.println("client rank is null");
}
if (game == null)
{
System.out.println("game is null");
}
if (_manager.GetServerConfig() == null)
{
System.out.println("_manager.GetServerConfig() is null");
}
if (ent.GetKit().GetAvailability() == KitAvailability.Free || //Free if (ent.GetKit().GetAvailability() == KitAvailability.Free || //Free
_manager.hasKitsUnlocked(player) || //YouTube _manager.hasKitsUnlocked(player) || //YouTube
(ent.GetKit().GetAvailability() == KitAvailability.Achievement && (ent.GetKit().GetAvailability() == KitAvailability.Achievement &&