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
- 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
- idint
- labelstring
- placeHolderstring
- characterLimitint
- contentTypeTMP_InputField.ContentType
- hintDescriptionstring
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
- idint
- labelstring
- placeHolderstring
- characterLimitint
- contentTypeTMP_InputField.ContentType
- hintDescriptionstring
- collectionIdbyte
- isServerOnlybool
- headerHeaderSetting
- onChangedAction<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
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
Text
Gets the value of the text entered by a client.
public string Text { get; }Property Value
Methods
RequestClear(Predicate<Player>)
Requests clients TextInputs to be cleared.
public void RequestClear(Predicate<Player> filter = null)Parameters
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
- placeholderstring
- characterLimitushort
- contentTypeTMP_InputField.ContentType
- overrideValuebool
- If false, sends fake values. 
- filterPredicate<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)