Enum Class StargateFlag

java.lang.Object
java.lang.Enum<StargateFlag>
org.sgrewritten.stargate.api.network.portal.flag.StargateFlag
All Implemented Interfaces:
Serializable, Comparable<StargateFlag>, Constable, PortalFlag

public enum StargateFlag extends Enum<StargateFlag> implements PortalFlag
Represents a portal flag which defines an enabled behavior for a stargate
  • Enum Constant Details

    • RANDOM

      public static final StargateFlag RANDOM
      A random stargate which teleports to a random destination in its network
    • INTERSERVER

      public static final StargateFlag INTERSERVER
      An across-server stargate using the new and better protocol
    • ALWAYS_ON

      public static final StargateFlag ALWAYS_ON
      A stargate which is always on and always open
    • BACKWARDS

      public static final StargateFlag BACKWARDS
      A stargate where the exit is on the opposite side of the sign
    • HIDDEN

      public static final StargateFlag HIDDEN
      A stargate which is hidden on the network for unprivileged users, except for the owner
    • PRIVATE

      public static final StargateFlag PRIVATE
      A stargate which can only be used by the owner and unprivileged users
    • FORCE_SHOW

      public static final StargateFlag FORCE_SHOW
      A stargate displaying all available destinations, regardless of whether they are available to the player
    • HIDE_NETWORK

      public static final StargateFlag HIDE_NETWORK
      A stargate with its network name hidden
    • FREE

      public static final StargateFlag FREE
      A free stargate, regardless of all set prices
    • LEGACY_INTERSERVER

      public static final StargateFlag LEGACY_INTERSERVER
      An across-server stargate using the legacy BungeeCord protocol
    • SILENT

      public static final StargateFlag SILENT
      A silent stargate which doesn't output a teleportation message
    • NO_SIGN

      public static final StargateFlag NO_SIGN
      A stargate without a sign.

      This is used by an official module, no implementation in Stargate-Core has been done

    • NETWORKED

      public static final StargateFlag NETWORKED
      A normal networked stargate
    • FIXED

      public static final StargateFlag FIXED
      A fixed stargate with only one destination
    • IRON_DOOR

      public static final StargateFlag IRON_DOOR
      A stargate whose opening can be entirely blocked by an iron door
    • PERSONAL_NETWORK

      public static final StargateFlag PERSONAL_NETWORK
      A stargate part of a personal network
    • DEFAULT_NETWORK

      public static final StargateFlag DEFAULT_NETWORK
      A stargate on the default network
    • CUSTOM_NETWORK

      public static final StargateFlag CUSTOM_NETWORK
      A stargate custom network
    • TERMINAL_NETWORK

      public static final StargateFlag TERMINAL_NETWORK
      A stargate on the terminal network NOT IMPLEMENTED AT THE MOMENT, temporary an internal flag (inaccessible)
  • Method Details

    • values

      public static StargateFlag[] 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 StargateFlag 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
    • getCharacterRepresentation

      public char getCharacterRepresentation()
      Description copied from interface: PortalFlag
      Gets the character representing this portal flag
      Specified by:
      getCharacterRepresentation in interface PortalFlag
      Returns:

      The character representing this portal flag

    • isCustom

      public boolean isCustom()
      Specified by:
      isCustom in interface PortalFlag
      Returns:

      True if this flag is custom

    • isInternalFlag

      public boolean isInternalFlag()
      Description copied from interface: PortalFlag
      Gets whether this flag is an internal flag

      User specifiable flags are flags like backwards or always on, which the user specifies upon creation. Internal flags are the flags that are implicitly set to some value based on the Stargate created.

      Specified by:
      isInternalFlag in interface PortalFlag
      Returns:

      True if this flag is user specifiable

    • parseFlags

      public static Set<StargateFlag> parseFlags(String flagString)
      Gets all portal flags present in the given string
      Returns:

      A set of all found portal flags

    • valueOf

      public static StargateFlag valueOf(char label) throws IllegalArgumentException
      Gets the portal flag corresponding to the given character
      Parameters:
      label -

      A character representing a portal flag

      Returns:

      The portal flag represented by the character

      Throws:
      IllegalArgumentException -

      If unable to find a matching flag

    • getUnrecognisedFlags

      public static Set<Character> getUnrecognisedFlags(String flagString)
      Ignores arguments enveloped within {}
      Parameters:
      flagString -

      A string of all flags

      Returns:

      Flags that were unrecognised, but might be addon flags

    • isBehaviorFlag

      public boolean isBehaviorFlag()
      Specified by:
      isBehaviorFlag in interface PortalFlag
      Returns:

      Whether this flag relates to how a portal selects destinations