Interface IPlayerConfigOptionClientStorageAPI<T extends Comparable<T>>

All Known Subinterfaces:
IPlayerConfigStringableOptionClientStorageAPI<T>

public interface IPlayerConfigOptionClientStorageAPI<T extends Comparable<T>>
API for a player config option value storage on the client side
  • Method Details

    • getOption

      @Nonnull IPlayerConfigOptionSpecAPI<T> getOption()
      Gets the option spec that this storage holds the value for.
      Returns:
      the option spec of this storage, not null
    • getId

      @Nonnull String getId()
      Gets the option string ID.
      Returns:
      the option string ID, not null
    • getComment

      @Nonnull String getComment()
      Gets the default comment text for the option.
      Returns:
      the default comment text, not null
    • getTranslation

      @Nonnull String getTranslation()
      Gets the translation key for the name of the option.
      Returns:
      translation key for the name of the option, not null
    • getTranslationArgs

      Object[] getTranslationArgs()
      Gets the translation key arguments for the name of this option.
      Returns:
      the translation key arguments, not null
    • getCommentTranslation

      @Nonnull String getCommentTranslation()
      Gets the translation key for the comment of this option.
      Returns:
      the comment translation key, not null
    • getCommentTranslationArgs

      @Nonnull Object[] getCommentTranslationArgs()
      Gets the translation key arguments for the comment of this option.
      Returns:
      the comment translation key arguments, not null
    • getType

      @Nonnull Class<T> getType()
      Gets the type of the option value that this storage holds.
      Returns:
      the type of the option value, not null
    • getValue

      @Nullable T getValue()
      Gets the stored option value.
      Returns:
      the stored value
    • getValidator

      @Nonnull BiPredicate<IPlayerConfigClientStorageAPI,T> getValidator()
      Gets the option value validator that checks whether a certain value is valid for the option.
      Returns:
      the option value validator, not null
    • getTooltipPrefix

      @Nullable String getTooltipPrefix()
      Gets the text prefix for the option tooltip on the UI screens.
      Returns:
      the tooltip prefix, null if there is none
    • isDefaulted

      boolean isDefaulted()
      Checks whether this option is forced to its default player config value.
      Returns:
      true if the option value is defaulted, otherwise false
    • isMutable

      boolean isMutable()
      Checks whether the local client player can edit this option's value.
      Returns:
      true if the option value is mutable, otherwise false