REMVOEOMOWAMo Arggg LOUIS!

This commit is contained in:
Kam committed 2023-06-05 13:06:25 -04:00
1 parent afe3c43dae
commit 3dc99dcf2c
1 file changed
+2 -11
+2 -11
View File
@@ -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)