Enum Class HighlightingStyle

java.lang.Object
java.lang.Enum<HighlightingStyle>
org.sgrewritten.stargate.network.portal.formatting.HighlightingStyle
All Implemented Interfaces:
Serializable, Comparable<HighlightingStyle>, Constable

public enum HighlightingStyle extends Enum<HighlightingStyle>
The highlighting characters to use around a portal or network name
  • Enum Constant Details

    • MINUS_SIGN

      public static final HighlightingStyle MINUS_SIGN
      The highlighting to use around a portal's name
    • LESSER_GREATER_THAN

      public static final HighlightingStyle LESSER_GREATER_THAN
      The highlighting to use around a portal's destination
    • GREATER_LESSER_THAN

      public static final HighlightingStyle GREATER_LESSER_THAN
      HighlightingStyle generally used for terminal gates
    • ROUNDED_BRACKETS

      public static final HighlightingStyle ROUNDED_BRACKETS
      The highlighting to use around a normal network name
    • SQUARE_BRACKETS

      public static final HighlightingStyle SQUARE_BRACKETS
      The highlighting used for the destination server of legacy bungee stargates
    • CURLY_BRACKETS

      public static final HighlightingStyle CURLY_BRACKETS
      The highlighting to use for personal networks
    • DOUBLE_GREATER_LESSER_THAN

      public static final HighlightingStyle DOUBLE_GREATER_LESSER_THAN
      A variant of GREATER_LESSER_THAN
    • NOTHING

      public static final HighlightingStyle NOTHING
      No highlighting at all. Just a workaround, really
  • Method Details

    • values

      public static HighlightingStyle[] 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 HighlightingStyle 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
    • getHighlightedName

      public String getHighlightedName(String name)
      Gets the given name with the highlighting applied
      Parameters:
      name -

      The name to highlight

      Returns:

      The highlighted name

    • getPrefix

      public String getPrefix()
      Returns:

      The prefix of this highlight

    • getSuffix

      public String getSuffix()
      Returns:

      The suffix of this highlight

    • getHighlightType

      public static HighlightingStyle getHighlightType(String highlightedText)
    • getNameFromHighlightedText

      public static String getNameFromHighlightedText(String highlightedName)
      Gets the plain name from a name with highlighting
      Parameters:
      highlightedName -

      The highlighted name

      Returns:

      The plain name