mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 06:09:05 +00:00
API Changes:
-Implemented interfaces for all jobs & roles. ScriptPlayer: -Added getData() function, which returns player data objects. IPlayerData: New class that holds all player data for modification. -Holds dialog, bank, quest, transport, faction, item giver, and mail data. -Also holds companion data, with functions has/set/getCompanion, and a getCompanionID function to differentiate companions.
This commit is contained in:
1 parent
587f63396f
commit
63a1525ee2
66 files changed
+1418
-207
No files matched your search
@@ -1,13 +1,24 @@
|
||||
package noppes.npcs.scripted.roles;
|
||||
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.roles.JobInterface;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.constants.JobType;
|
||||
import noppes.npcs.scripted.interfaces.entity.ICustomNpc;
|
||||
import noppes.npcs.scripted.interfaces.jobs.IJob;
|
||||
|
||||
public class ScriptJobInterface {
|
||||
protected EntityNPCInterface npc;
|
||||
public class ScriptJobInterface implements IJob {
|
||||
public final EntityNPCInterface npc;
|
||||
public final JobInterface jobInterface;
|
||||
|
||||
public ScriptJobInterface(JobInterface jobInterface) {
|
||||
this.npc = null;
|
||||
this.jobInterface = jobInterface;
|
||||
}
|
||||
|
||||
public ScriptJobInterface(EntityNPCInterface npc){
|
||||
this.npc = npc;
|
||||
this.jobInterface = npc.jobInterface;
|
||||
}
|
||||
/**
|
||||
* @see noppes.npcs.scripted.constants.JobType
|
||||
@@ -16,4 +27,13 @@ public class ScriptJobInterface {
|
||||
public int getType(){
|
||||
return JobType.UNKNOWN;
|
||||
}
|
||||
|
||||
public JobInterface getJobInterface() {
|
||||
return jobInterface;
|
||||
}
|
||||
|
||||
public ICustomNpc getNpc() {
|
||||
return (ICustomNpc) NpcAPI.Instance().getIEntity(npc);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user