2018-09-13 12:03:28 -04:00
|
|
|
package noppes.npcs.scripted.roles;
|
|
|
|
|
|
2023-01-12 21:33:06 -05:00
|
|
|
import noppes.npcs.api.entity.ICustomNpc;
|
|
|
|
|
import noppes.npcs.api.jobs.IJob;
|
2018-09-13 12:03:28 -04:00
|
|
|
import noppes.npcs.entity.EntityNPCInterface;
|
2022-06-12 01:26:23 -05:00
|
|
|
import noppes.npcs.roles.JobInterface;
|
|
|
|
|
import noppes.npcs.scripted.NpcAPI;
|
2018-09-13 12:03:28 -04:00
|
|
|
import noppes.npcs.scripted.constants.JobType;
|
|
|
|
|
|
2022-06-12 01:26:23 -05:00
|
|
|
public class ScriptJobInterface implements IJob {
|
|
|
|
|
public final EntityNPCInterface npc;
|
|
|
|
|
public final JobInterface jobInterface;
|
|
|
|
|
|
|
|
|
|
public ScriptJobInterface(JobInterface jobInterface) {
|
|
|
|
|
this.npc = null;
|
|
|
|
|
this.jobInterface = jobInterface;
|
|
|
|
|
}
|
2018-09-13 12:03:28 -04:00
|
|
|
|
|
|
|
|
public ScriptJobInterface(EntityNPCInterface npc){
|
|
|
|
|
this.npc = npc;
|
2022-06-12 01:26:23 -05:00
|
|
|
this.jobInterface = npc.jobInterface;
|
2018-09-13 12:03:28 -04:00
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* @see noppes.npcs.scripted.constants.JobType
|
|
|
|
|
* @return Returns the JobType
|
|
|
|
|
*/
|
|
|
|
|
public int getType(){
|
|
|
|
|
return JobType.UNKNOWN;
|
|
|
|
|
}
|
2022-06-12 01:26:23 -05:00
|
|
|
|
|
|
|
|
public JobInterface getJobInterface() {
|
|
|
|
|
return jobInterface;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ICustomNpc getNpc() {
|
|
|
|
|
return (ICustomNpc) NpcAPI.Instance().getIEntity(npc);
|
|
|
|
|
}
|
|
|
|
|
|
2018-09-13 12:03:28 -04:00
|
|
|
}
|