mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-14 01:24:09 +00:00
49 lines
1.2 KiB
Java
49 lines
1.2 KiB
Java
package noppes.npcs.scripted.roles;
|
|
|
|
import net.minecraft.entity.player.EntityPlayerMP;
|
|
import noppes.npcs.entity.EntityNPCInterface;
|
|
import noppes.npcs.roles.RoleTransporter;
|
|
import noppes.npcs.scripted.constants.RoleType;
|
|
import noppes.npcs.api.entity.IPlayer;
|
|
import noppes.npcs.api.handler.data.ITransportLocation;
|
|
import noppes.npcs.api.roles.IRoleTransporter;
|
|
|
|
public class ScriptRoleTransporter extends ScriptRoleInterface implements IRoleTransporter {
|
|
private final RoleTransporter role;
|
|
|
|
public ScriptRoleTransporter(EntityNPCInterface npc) {
|
|
super(npc);
|
|
role = (RoleTransporter) npc.roleInterface;
|
|
|
|
}
|
|
|
|
public String getName() {
|
|
return role.name;
|
|
}
|
|
|
|
public int getTransportId() {
|
|
return role.transportId;
|
|
}
|
|
|
|
public void unlock(IPlayer<EntityPlayerMP> player, ITransportLocation location) {
|
|
this.role.unlock(player.getMCEntity(), location);
|
|
}
|
|
|
|
public ITransportLocation getTransport(){
|
|
return this.role.getLocation();
|
|
}
|
|
|
|
public boolean hasTransport(){
|
|
return this.role.hasTransport();
|
|
}
|
|
|
|
public void setTransport(ITransportLocation location) {
|
|
this.role.setTransport(location);
|
|
}
|
|
|
|
@Override
|
|
public int getType(){
|
|
return RoleType.TRANSPORTER;
|
|
}
|
|
}
|