Just in case NULL Check

This commit is contained in:
Kam committed 2023-06-04 22:03:58 -04:00
1 parent fb4c9ffe1e
commit cf37e5c355
1 file changed
+4
@@ -201,6 +201,10 @@ public class NpcAPI extends AbstractNpcAPI {
scriptPlayerCache.put(entity.getPersistentID(),new ScriptEntityData(new ScriptPlayer<>((EntityPlayerMP) entity)));
}
data = scriptPlayerCache.get(entity.getPersistentID());
if(data == null){
scriptPlayerCache.put(entity.getPersistentID(),new ScriptEntityData(new ScriptPlayer<>((EntityPlayerMP) entity)));
data = scriptPlayerCache.get(entity.getPersistentID());
}
}
else if(PixelmonHelper.isPixelmon(entity))
return new ScriptPixelmon<EntityTameable>((EntityTameable) entity);