Files
CustomNPC-Plus/src/main/java/noppes/npcs/scripted/roles/ScriptJobInterface.java
T
2023-01-12 21:33:06 -05:00

40 lines
944 B
Java

package noppes.npcs.scripted.roles;
import noppes.npcs.api.entity.ICustomNpc;
import noppes.npcs.api.jobs.IJob;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.roles.JobInterface;
import noppes.npcs.scripted.NpcAPI;
import noppes.npcs.scripted.constants.JobType;
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
* @return Returns the JobType
*/
public int getType(){
return JobType.UNKNOWN;
}
public JobInterface getJobInterface() {
return jobInterface;
}
public ICustomNpc getNpc() {
return (ICustomNpc) NpcAPI.Instance().getIEntity(npc);
}
}