Every function in API classes that calls the main API class now calls the loaded API wrapper, renamed to NpcAPI, instead of the abstract class, renamed to AbstractNpcAPI.

This commit is contained in:
Luis C.M committed 2022-05-11 17:12:48 -05:00
1 parent 6dea5a1cbc
commit 6896cec417
41 files changed
+252 -172

No files matched your search

@@ -11,8 +11,8 @@ import noppes.npcs.scripted.interfaces.item.IItemStack;
import noppes.npcs.scripted.item.ScriptItemStack;
import noppes.npcs.scripted.constants.EntityType;
import noppes.npcs.scripted.interfaces.entity.IEntityLivingBase;
import noppes.npcs.scripted.wrapper.NpcAPI;
import noppes.npcs.scripted.wrapper.ScriptDamageSource;
import noppes.npcs.scripted.wrapper.WrapperNpcAPI;
public class ScriptLivingBase<T extends EntityLivingBase> extends ScriptEntity<T> implements IEntityLivingBase {
protected T entity;
@@ -174,7 +174,7 @@ public class ScriptLivingBase<T extends EntityLivingBase> extends ScriptEntity<T
* @return The item the entity is holding
*/
public IItemStack getHeldItem(){
return WrapperNpcAPI.Instance().getIItemStack(entity.getHeldItem());
return NpcAPI.Instance().getIItemStack(entity.getHeldItem());
}
/**
@@ -192,7 +192,7 @@ public class ScriptLivingBase<T extends EntityLivingBase> extends ScriptEntity<T
* @return The item in the given slot
*/
public IItemStack getArmor(int slot){
return WrapperNpcAPI.Instance().getIItemStack(entity.getEquipmentInSlot(slot + 1));
return NpcAPI.Instance().getIItemStack(entity.getEquipmentInSlot(slot + 1));
}
/**