Target
Players picked by a CommandAttribute argument. Accepts @me, @all, @team, @enemy, #slot, a SteamID (64, Steam2 or Steam3), or part of a player's name. Players the caller can't target are left out according to CommandAttribute.TargetImmunity. Never empty: a pattern that matches nobody is a usage error before the command runs.
public sealed class Target : IReadOnlyList<CCitadelPlayerController>
Namespace: DeadworksManaged.Api
Inherits / implements: IReadOnlyList<CCitadelPlayerController>
Source: Commands/Target.cs#L11
Properties
Target.Input
The argument as typed.
Signature
public string Input { get; }
Source: Commands/Target.cs#L16
Target.IsGroup
True for @all, @team and @enemy, which may match several players.
Signature
public bool IsGroup { get; }
Source: Commands/Target.cs#L19
Target.Count
How many players matched; at least one.
Signature
public int Count { get; }
Source: Commands/Target.cs#L51
Target[]
The matched player at index.
Signature
public CCitadelPlayerController this[int index] { get; }
Source: Commands/Target.cs#L53
Methods
Target.Resolve()
Resolves input the way a Target parameter is bound, for commands that decide for themselves whether an argument is a player, e.g. "a player, or a SteamID that isn't online". Players the caller can't target are left out unless enforceImmunity is false.
Signature
public static Target Resolve(Caller caller, string input, bool enforceImmunity = true)
Throws
CommandException: Nobody matches, or a single-player pattern hits someone the caller can't target.
Source: Commands/Target.cs#L34
Target.Single()
The one player matched, or a CommandException telling the caller to be more specific.
Signature
public CCitadelPlayerController Single()
Source: Commands/Target.cs#L45
Target.GetEnumerator()
Signature
public IEnumerator<CCitadelPlayerController> GetEnumerator()
Source: Commands/Target.cs#L55