Enum Class FilterType

java.lang.Object
java.lang.Enum<FilterType>
studio.magemonkey.codex.mccore.config.FilterType
All Implemented Interfaces:
Serializable, Comparable<FilterType>, Constable

public enum FilterType extends Enum<FilterType>

Types of filters available for the language configuration

  • Enum Constant Details

    • NONE

      public static final FilterType NONE
      No filters are to be applied. The String will be returned as-is
    • COLOR

      public static final FilterType COLOR
      The string will be colored using '&' followed by a valid character to represent color codes.
    • SPECIAL

      public static final FilterType SPECIAL

      The string will look for special filters and replace them with the appropriate replacement. Special filters include:

      • {expandFront(<text>,<size>,<length>)} - Expands the text to the desired size, appending whitespace in front of the text. This can be used to perfectly line up lines of text with each other when you size things to the same value. The 'size' is the size for player displays whereas the 'length' is the desired length of the string for the console. The two values are due to the console having a monotype font while in game is not one.
      • {expandBack(<text>,<size>,<length>)} - The same as {expandFront(<text>,<size>,<length>)} except it places the whitespace after the text.
      • {break} - Fills the remaining space on the line with dashes. To make it a solid line, preceed it with strike-through (&m).
    • ALL

      public static final FilterType ALL

      Applies all available filters described above

  • Method Details

    • values

      public static FilterType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FilterType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null