mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 03:47:27 +00:00
REMVOEOMOWAMo Arggg LOUIS!
This commit is contained in:
1 parent
afe3c43dae
commit
3dc99dcf2c
1 file changed
+2
-11
@@ -73,7 +73,6 @@ public class NpcAPI extends AbstractNpcAPI {
|
||||
private static final Map<Integer, ScriptWorld> worldCache = new LRUHashMap<>(10);
|
||||
private static final CacheHashMap<ItemStack, CacheHashMap.CachedObject<ScriptItemStack>> scriptItemCache = new CacheHashMap<>(60*1000);
|
||||
public static final HashMap<String,Object> engineObjects = new HashMap<>();
|
||||
public static final HashMap<UUID,ScriptEntityData> scriptPlayerCache = new HashMap<>();
|
||||
public static final EventBus EVENT_BUS = new EventBus();
|
||||
private static AbstractNpcAPI instance = null;
|
||||
|
||||
@@ -196,16 +195,8 @@ public class NpcAPI extends AbstractNpcAPI {
|
||||
ScriptEntityData data = (ScriptEntityData) entity.getExtendedProperties("ScriptedObject");
|
||||
if(data != null)
|
||||
return data.base;
|
||||
if(entity instanceof EntityPlayerMP) {
|
||||
if (!scriptPlayerCache.containsKey(entity.getPersistentID())) {
|
||||
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());
|
||||
}
|
||||
}
|
||||
if(entity instanceof EntityPlayerMP)
|
||||
data = new ScriptEntityData(new ScriptPlayer<>((EntityPlayerMP) entity));
|
||||
else if(PixelmonHelper.isPixelmon(entity))
|
||||
return new ScriptPixelmon<EntityTameable>((EntityTameable) entity);
|
||||
else if(entity instanceof EntityAnimal)
|
||||
|
||||
Reference in new issue
Block a user