Table of Contents

Class Effect

Namespace
Exiled.API.Features
Assembly
Exiled.API.dll

Useful class to save effect-related configs cleanly.

public class Effect
Inheritance
Effect
Inherited Members
Extension Methods

Constructors

Effect()

Initializes a new instance of the Effect class.

public Effect()

Effect(StatusEffectBase)

Initializes a new instance of the Effect class.

public Effect(StatusEffectBase statusEffectBase)

Parameters

statusEffectBase StatusEffectBase

Get all the information of the effect>.

Effect(EffectType, float, byte, bool, bool)

Initializes a new instance of the Effect class.

public Effect(EffectType type, float duration, byte intensity = 1, bool addDurationIfActive = false, bool isEnabled = true)

Parameters

type EffectType

The type of the effect>.

duration float

The duration of the effect, in seconds.

intensity byte

The intensity of the effect.

addDurationIfActive bool

Whether the effect will add duration onto the effect if already active or not.

isEnabled bool

Whether the effect should be enabled.

Properties

AddDurationIfActive

Gets or sets a value indicating whether the effect will add duration onto the effect if already active or not.

public bool AddDurationIfActive { get; set; }

Property Value

bool

Duration

Gets or sets the effect duration.

public float Duration { get; set; }

Property Value

float

Intensity

Gets or sets the effect intensity.

public byte Intensity { get; set; }

Property Value

byte

IsEnabled

Gets or sets a value indicating whether the effect should be enabled.

public bool IsEnabled { get; set; }

Property Value

bool

Type

Gets or sets the effect type.

public EffectType Type { get; set; }

Property Value

EffectType

Methods

ToString()

Returns the effect in a human-readable format.

public override string ToString()

Returns

string

A string containing effect-related data.