Used interfaces in implementations instead of the real classes for most scripted classes.

This commit is contained in:
Luis C.M committed 2022-05-11 22:08:31 -05:00
1 parent 6896cec417
commit cf33b90b26
63 files changed
+466 -551

No files matched your search

@@ -3,6 +3,7 @@ package noppes.npcs.scripted.event;
import net.minecraft.entity.player.EntityPlayer;
import noppes.npcs.controllers.Dialog;
import noppes.npcs.controllers.ScriptController;
import noppes.npcs.scripted.NpcAPI;
import noppes.npcs.scripted.interfaces.entity.IPlayer;
public class ScriptEventDialog extends ScriptEvent{
@@ -12,7 +13,7 @@ public class ScriptEventDialog extends ScriptEvent{
public Dialog dialogObj;
public ScriptEventDialog(EntityPlayer player, int dialog, int option, Dialog dialogObj){
this.player = (IPlayer) ScriptController.Instance.getScriptForEntity(player);
this.player = (IPlayer) NpcAPI.Instance().getIEntity(player);
this.dialog = dialog;
this.option = option;
this.dialogObj = dialogObj;