Table of Contents

Class Warning

Namespace
Uncreated.Warfare.Moderation.Punishments
Assembly
Uncreated.Warfare.dll
[JsonConverter(typeof(ModerationEntryConverter))]
public class Warning : Punishment, IModerationEntry
Inheritance
Warning
Implements
Inherited Members

Properties

DisplayedTimestamp

The timestamp the player actually sees the warning. This is for when a player is warned while they're offline.

[JsonPropertyName("displayed_utc")]
public DateTimeOffset? DisplayedTimestamp { get; set; }

Property Value

DateTimeOffset?

HasBeenDisplayed

false until the player actually sees the warning. This is for when a player is warned while they're offline.

[JsonIgnore]
public bool HasBeenDisplayed { get; }

Property Value

bool

Remarks

Always false for legacy Warnings.

Methods

AddExtraInfo(DatabaseInterface, List<string>, IFormatProvider, CancellationToken)

public override Task AddExtraInfo(DatabaseInterface db, List<string> workingList, IFormatProvider formatter, CancellationToken token = default)

Parameters

db DatabaseInterface
workingList List<string>
formatter IFormatProvider
token CancellationToken

Returns

Task

GetDisplayName()

public override string GetDisplayName()

Returns

string

ReadProperty(ref Utf8JsonReader, string, JsonSerializerOptions)

public override bool ReadProperty(ref Utf8JsonReader reader, string propertyName, JsonSerializerOptions options)

Parameters

reader Utf8JsonReader
propertyName string
options JsonSerializerOptions

Returns

bool

Write(Utf8JsonWriter, JsonSerializerOptions)

public override void Write(Utf8JsonWriter writer, JsonSerializerOptions options)

Parameters

writer Utf8JsonWriter
options JsonSerializerOptions