Table of Contents

Class UserTextInputSetting

Namespace
Exiled.API.Features.Core.UserSettings
Assembly
Exiled.API.dll

Represents a user text input setting.

public class UserTextInputSetting : SettingBase, IWrapper<ServerSpecificSettingBase>, IWrapper<SSPlaintextSetting>
Inheritance
UserTextInputSetting
Implements
IWrapper<ServerSpecificSettingBase>
IWrapper<SSPlaintextSetting>
Inherited Members
Extension Methods

Constructors

UserTextInputSetting(int, string, string, int, ContentType, string)

Initializes a new instance of the UserTextInputSetting class.

[Obsolete("Will be removed in Exiled 10 in favour of ctor with more params.")]
public UserTextInputSetting(int id, string label, string placeHolder, int characterLimit, TMP_InputField.ContentType contentType, string hintDescription)

Parameters

id int
label string
placeHolder string
characterLimit int
contentType TMP_InputField.ContentType
hintDescription string

UserTextInputSetting(int, string, string, int, ContentType, string, byte, bool, HeaderSetting, Action<Player, SettingBase>)

Initializes a new instance of the UserTextInputSetting class.

public UserTextInputSetting(int id, string label, string placeHolder = "", int characterLimit = 64, TMP_InputField.ContentType contentType = ContentType.Standard, string hintDescription = null, byte collectionId = 255, bool isServerOnly = false, HeaderSetting header = null, Action<Player, SettingBase> onChanged = null)

Parameters

id int
label string
placeHolder string
characterLimit int
contentType TMP_InputField.ContentType
hintDescription string
collectionId byte
isServerOnly bool
header HeaderSetting
onChanged Action<Player, SettingBase>

Properties

Base

Gets the base UserSettings.ServerSpecific.SSPlaintextSetting that this class is wrapping.

public SSPlaintextSetting Base { get; }

Property Value

SSPlaintextSetting

CharacterLimit

Gets or sets a value indicating the max number of characters in the PlainTextSetting.

public int CharacterLimit { get; set; }

Property Value

int

ContentType

Gets or sets a value indicating the type of content within the PlainTextSetting.

public TMP_InputField.ContentType ContentType { get; set; }

Property Value

TMP_InputField.ContentType

PlaceHolder

Gets or sets a value indicating the placeholder shown within the PlainTextSetting.

public string PlaceHolder { get; set; }

Property Value

string

Text

Gets the value of the text entered by a client.

public string Text { get; }

Property Value

string

Methods

RequestClear(Predicate<Player>)

Requests clients TextInputs to be cleared.

public void RequestClear(Predicate<Player> filter = null)

Parameters

filter Predicate<Player>

Who to send the request to.

ToString()

Returns a representation of this UserTextInputSetting.

public override string ToString()

Returns

string

A string in human-readable format.

UpdateSetting(string, ushort, ContentType, bool, Predicate<Player>)

Sends updated values to clients.

public void UpdateSetting(string placeholder, ushort characterLimit, TMP_InputField.ContentType contentType, bool overrideValue = true, Predicate<Player> filter = null)

Parameters

placeholder string
characterLimit ushort
contentType TMP_InputField.ContentType
overrideValue bool

If false, sends fake values.

filter Predicate<Player>

Who to send the update to.

UpdateValue(string, bool, Predicate<Player>)

If setting is server only, sends updated values to clients.

public void UpdateValue(string value, bool overrideValue = true, Predicate<Player> filter = null)

Parameters

value string
overrideValue bool

If false, sends fake values.

filter Predicate<Player>

Who to send the update to.