Class ChangingRoleEventArgs
Contains all information before a player's PlayerRoles.RoleTypeId changes.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Exiled.Events.EventArgs.Player
Assembly: Exiled.Events.dll
Syntax
public class ChangingRoleEventArgs : IPlayerEvent, IDeniableEvent, IExiledEvent
Constructors
| Improve this Doc View SourceChangingRoleEventArgs(Player, RoleTypeId, RoleChangeReason, RoleSpawnFlags)
Initializes a new instance of the ChangingRoleEventArgs class.
Declaration
public ChangingRoleEventArgs(Player player, RoleTypeId newRole, RoleChangeReason reason, RoleSpawnFlags spawnFlags)
Parameters
Type | Name | Description |
---|---|---|
Player | player | |
PlayerRoles.RoleTypeId | newRole | |
PlayerRoles.RoleChangeReason | reason | |
PlayerRoles.RoleSpawnFlags | spawnFlags |
Properties
| Improve this Doc View SourceAmmo
Gets the base ammo values for the new role.
Declaration
public Dictionary<ItemType, ushort> Ammo { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<ItemType, System.UInt16> |
IsAllowed
Gets or sets a value indicating whether the event can continue.
Declaration
public bool IsAllowed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Items
Gets base items that the player will receive.
Declaration
public List<ItemType> Items { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<ItemType> |
NewRole
Gets or sets the new player's role.
Declaration
public RoleTypeId NewRole { get; set; }
Property Value
Type | Description |
---|---|
PlayerRoles.RoleTypeId |
Player
Gets the player whose PlayerRoles.RoleTypeId is changing.
Declaration
public Player Player { get; }
Property Value
Type | Description |
---|---|
Player |
Reason
Gets or sets the reason for their class change.
Declaration
public SpawnReason Reason { get; set; }
Property Value
Type | Description |
---|---|
SpawnReason |
ShouldPreserveInventory
Gets or sets a value indicating whether the inventory will be preserved or not.
Declaration
public bool ShouldPreserveInventory { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
SpawnFlags
Gets or sets the spawn flags for their class change.
Declaration
public RoleSpawnFlags SpawnFlags { get; set; }
Property Value
Type | Description |
---|---|
PlayerRoles.RoleSpawnFlags |
Methods
| Improve this Doc View SourceFinalize()
Finalizes an instance of the ChangingRoleEventArgs class.
Declaration
protected void Finalize()