mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 04:57:27 +00:00
Just in case NULL Check
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user