mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 03:49:10 +00:00
Used interfaces in implementations instead of the real classes for most scripted classes.
This commit is contained in:
1 parent
6896cec417
commit
cf33b90b26
63 files changed
+466
-551
No files matched your search
@@ -11,6 +11,7 @@ import noppes.npcs.controllers.IScriptHandler;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.interfaces.entity.ICustomNpc;
|
||||
|
||||
import javax.annotation.CheckForNull;
|
||||
@@ -119,7 +120,7 @@ public class NPCDataScript implements IScriptHandler {
|
||||
}
|
||||
public ICustomNpc getNpc() {
|
||||
if (this.npcAPI == null) {
|
||||
this.npcAPI = (ICustomNpc) ScriptController.Instance.getScriptForEntity(this.npc);
|
||||
this.npcAPI = (ICustomNpc) NpcAPI.Instance().getIEntity(this.npc);
|
||||
}
|
||||
return this.npcAPI;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user