Class Objective
- Namespace
- Exiled.API.Features.Objectives
- Assembly
- Exiled.API.dll
A wrapper for Faction objective.
public class Objective : TypeCastObject<FactionObjectiveBase>, IWrapper<FactionObjectiveBase>
- Inheritance
-
TypeCastObject<FactionObjectiveBase>Objective
- Implements
-
IWrapper<FactionObjectiveBase>
- Derived
- Inherited Members
- Extension Methods
Properties
Base
Gets the base Respawning.Objectives.FactionObjectiveBase that this class is wrapping.
public FactionObjectiveBase Base { get; }
Property Value
- FactionObjectiveBase
List
Gets all objectives.
public static IReadOnlyCollection<Objective> List { get; }
Property Value
Type
Gets the type of objective.
public virtual ObjectiveType Type { get; }
Property Value
Methods
Achieve()
Achieves objective.
public void Achieve()
Get(ObjectiveType)
Gets the objective by its type.
public static Objective Get(ObjectiveType type)
Parameters
typeObjectiveTypeType of objective.
Returns
Get(FactionObjectiveBase)
Gets the objective by its base.
public static Objective Get(FactionObjectiveBase factionObjectiveBase)
Parameters
factionObjectiveBaseFactionObjectiveBaseA Respawning.Objectives.FactionObjectiveBase instance.
Returns
GrantInfluence(Faction, float)
Grants influence to faction.
public void GrantInfluence(Faction faction, float amount)
Parameters
factionFactionFaction to affect.
amountfloatAmount of influence to grant.
IsValidFaction(Player)
Checks if player has this objective.
public bool IsValidFaction(Player player)
Parameters
playerPlayerPlayer to check.
Returns
- bool
trueif player has this objective,falseotherwise.
IsValidFaction(Faction)
Checks if faction has this objective.
public bool IsValidFaction(Faction faction)
Parameters
factionFactionFaction to check.
Returns
- bool
trueif faction has this objective,falseotherwise.
ReduceTimer(Faction, float)
Reduces timer for faction.
public void ReduceTimer(Faction faction, float seconds)
Parameters
factionFactionFaction to affect.
secondsfloatTime to reduce in seconds.