Interface IPlayerConfigOptionSpecAPI<T extends Comparable<T>>
- Type Parameters:
T
- the type of values of this option
public interface IPlayerConfigOptionSpecAPI<T extends Comparable<T>>
A player config option instance used for player config option representation in various API features.
-
Method Summary
Modifier and TypeMethodDescriptionGets the client-side validator for potential values of this option.Gets the String->value parser of this option, mainly used for commands.Gets the value->String converter of this option, mainly used for commands.Gets the default en_us comment for this option.Gets the translation key for the comment of this option.String[]
Gets the translation key arguments for the comment of this option.Gets the config type filter of this option.Gets the default value that this option is set to in configs.getId()
Gets the ID of this option.getPath()
Gets the path of this option, which is just the ID fromgetId()
but separated into elements.Gets the server-side validator for potential values of this option.Gets the shortened ID of this option, without the "playerConfig." prefix.Gets the prefix applied to the tooltip of this option on the UI.Gets the translation key for the name of this option.String[]
Gets the translation key arguments for the name of this option.getType()
Gets the type of values that this option can have.
-
Method Details
-
getId
Gets the ID of this option.Use
getPath()
if you need it separated into elements.- Returns:
- the string ID, not null
-
getShortenedId
Gets the shortened ID of this option, without the "playerConfig." prefix.- Returns:
- the shortened string ID, not null
-
getPath
Gets the path of this option, which is just the ID fromgetId()
but separated into elements.- Returns:
- the path, not null
-
getType
Gets the type of values that this option can have.- Returns:
- the type of values, not null
-
getTranslation
Gets the translation key for the name of this option.- Returns:
- the translation key, not null
-
getTranslationArgs
Gets the translation key arguments for the name of this option.- Returns:
- the translation key arguments, not null
-
getCommentTranslation
Gets the translation key for the comment of this option.- Returns:
- the comment translation key, not null
-
getCommentTranslationArgs
Gets the translation key arguments for the comment of this option.- Returns:
- the comment translation key arguments, not null
-
getComment
Gets the default en_us comment for this option.- Returns:
- the default comment, not null
-
getDefaultValue
Gets the default value that this option is set to in configs.- Returns:
- the default value, not null
-
getClientSideValidator
Gets the client-side validator for potential values of this option.- Returns:
- the client-side value validator, not null
-
getServerSideValidator
Gets the server-side validator for potential values of this option.- Returns:
- the server-side value validator, not null
-
getTooltipPrefix
Gets the prefix applied to the tooltip of this option on the UI.- Returns:
- the tooltip prefix, null if no prefix
-
getCommandInputParser
Gets the String->value parser of this option, mainly used for commands.- Returns:
- the String->value parser, not null
-
getCommandOutputWriter
Gets the value->String converter of this option, mainly used for commands.- Returns:
- the value->String converter, not null
-
getConfigTypeFilter
Gets the config type filter of this option.The filter allows this option to only appear and be configurable on some types of player configs (e.g. just the server claims config).
- Returns:
- the config type filter, not null
-