Files
CustomNPC-Plus/src/main/java/noppes/npcs/scripted/ScriptFaction.java
T

53 lines
1.2 KiB
Java
Raw Normal View History

2018-09-13 12:03:28 -04:00
package noppes.npcs.scripted;
import net.minecraft.entity.player.EntityPlayer;
2018-09-13 12:03:28 -04:00
import noppes.npcs.controllers.Faction;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.scripted.interfaces.entity.ICustomNpc;
import noppes.npcs.scripted.interfaces.entity.IPlayer;
2018-09-13 12:03:28 -04:00
public class ScriptFaction {
private Faction faction;
public ScriptFaction(Faction faction){
this.faction = faction;
}
/**
* @return Returns the factions id
*/
public int getId(){
return faction.id;
}
/**
* @return Return the factions name
*/
public String getName(){
return faction.name;
}
public int getDefaultPoints(){
return faction.defaultPoints;
}
public int getColor(){
return faction.color;
}
public boolean isFriendlyToPlayer(IPlayer player){
return faction.isFriendlyToPlayer((EntityPlayer) player.getMCEntity());
2018-09-13 12:03:28 -04:00
}
public boolean isNeutralToPlayer(IPlayer player){
return faction.isNeutralToPlayer((EntityPlayer) player.getMCEntity());
2018-09-13 12:03:28 -04:00
}
public boolean isAggressiveToPlayer(IPlayer player){
return faction.isAggressiveToPlayer((EntityPlayer) player.getMCEntity());
2018-09-13 12:03:28 -04:00
}
public boolean isAggressiveToNpc(ICustomNpc npc){
return faction.isAggressiveToNpc((EntityNPCInterface) npc.getMCEntity());
2018-09-13 12:03:28 -04:00
}
}