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
type
ObjectiveTypeType of objective.
Returns
Get(FactionObjectiveBase)
Gets the objective by its base.
public static Objective Get(FactionObjectiveBase factionObjectiveBase)
Parameters
factionObjectiveBase
FactionObjectiveBaseA Respawning.Objectives.FactionObjectiveBase instance.
Returns
GrantInfluence(Faction, float)
Grants influence to faction.
public void GrantInfluence(Faction faction, float amount)
Parameters
faction
FactionFaction to affect.
amount
floatAmount of influence to grant.
IsValidFaction(Player)
Checks if player has this objective.
public bool IsValidFaction(Player player)
Parameters
player
PlayerPlayer to check.
Returns
- bool
true
if player has this objective,false
otherwise.
IsValidFaction(Faction)
Checks if faction has this objective.
public bool IsValidFaction(Faction faction)
Parameters
faction
FactionFaction to check.
Returns
- bool
true
if faction has this objective,false
otherwise.
ReduceTimer(Faction, float)
Reduces timer for faction.
public void ReduceTimer(Faction faction, float seconds)
Parameters
faction
FactionFaction to affect.
seconds
floatTime to reduce in seconds.