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

@@ -28,7 +28,7 @@ import noppes.npcs.scripted.interfaces.item.IItemStack;
import noppes.npcs.scripted.interfaces.overlay.ICustomOverlay;
import noppes.npcs.scripted.item.ScriptItemStack;
import noppes.npcs.scripted.overlay.ScriptOverlay;
import noppes.npcs.scripted.wrapper.WrapperNpcAPI;
import noppes.npcs.scripted.wrapper.NpcAPI;
import noppes.npcs.util.ValueUtil;
import java.util.ArrayList;
@@ -247,7 +247,7 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
for(int i = 0; i < player.inventory.mainInventory.length; i++){
ItemStack item = player.inventory.mainInventory[i];
if(item != null)
items[i] = WrapperNpcAPI.Instance().getIItemStack(item);
items[i] = NpcAPI.Instance().getIItemStack(item);
}
return items;
}