Enum Class StargateFlag
- All Implemented Interfaces:
Serializable
,Comparable<StargateFlag>
,Constable
,PortalFlag
Represents a portal flag which defines an enabled behavior for a stargate
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA stargate which is always on and always openA stargate where the exit is on the opposite side of the signA stargate custom networkA stargate on the default networkA fixed stargate with only one destinationA stargate displaying all available destinations, regardless of whether they are available to the playerA free stargate, regardless of all set pricesA stargate which is hidden on the network for unprivileged users, except for the ownerA stargate with its network name hiddenAn across-server stargate using the new and better protocolA stargate whose opening can be entirely blocked by an iron doorAn across-server stargate using the legacy BungeeCord protocolA normal networked stargateA stargate without a sign.A stargate part of a personal networkA stargate which can only be used by the owner and unprivileged usersA random stargate which teleports to a random destination in its networkA silent stargate which doesn't output a teleportation messageA stargate on the terminal network NOT IMPLEMENTED AT THE MOMENT, temporary an internal flag (inaccessible) -
Field Summary
Fields inherited from interface org.sgrewritten.stargate.api.network.portal.flag.PortalFlag
ALWAYS_ON, BACKWARDS, CUSTOM_NETWORK, DEFAULT_NETWORK, FIXED, FORCE_SHOW, FREE, HIDDEN, HIDE_NETWORK, INTERSERVER, IRON_DOOR, LEGACY_INTERSERVER, NETWORKED, NO_SIGN, PERSONAL_NETWORK, PRIVATE, RANDOM, SILENT, TERMINAL_NETWORK
-
Method Summary
Modifier and TypeMethodDescriptionchar
Gets the character representing this portal flaggetUnrecognisedFlags
(String flagString) Ignores arguments enveloped within {}boolean
boolean
isCustom()
boolean
Gets whether this flag is an internal flagstatic Set
<StargateFlag> parseFlags
(String flagString) Gets all portal flags present in the given stringstatic StargateFlag
valueOf
(char label) Gets the portal flag corresponding to the given characterstatic StargateFlag
Returns the enum constant of this class with the specified name.static StargateFlag[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RANDOM
A random stargate which teleports to a random destination in its network -
INTERSERVER
An across-server stargate using the new and better protocol -
ALWAYS_ON
A stargate which is always on and always open -
BACKWARDS
A stargate where the exit is on the opposite side of the sign -
HIDDEN
A stargate which is hidden on the network for unprivileged users, except for the owner -
PRIVATE
A stargate which can only be used by the owner and unprivileged users -
FORCE_SHOW
A stargate displaying all available destinations, regardless of whether they are available to the player -
HIDE_NETWORK
A stargate with its network name hidden -
FREE
A free stargate, regardless of all set prices -
LEGACY_INTERSERVER
An across-server stargate using the legacy BungeeCord protocol -
SILENT
A silent stargate which doesn't output a teleportation message -
NO_SIGN
A stargate without a sign.This is used by an official module, no implementation in Stargate-Core has been done
-
NETWORKED
A normal networked stargate -
FIXED
A fixed stargate with only one destination -
IRON_DOOR
A stargate whose opening can be entirely blocked by an iron door -
PERSONAL_NETWORK
A stargate part of a personal network -
DEFAULT_NETWORK
A stargate on the default network -
CUSTOM_NETWORK
A stargate custom network -
TERMINAL_NETWORK
A stargate on the terminal network NOT IMPLEMENTED AT THE MOMENT, temporary an internal flag (inaccessible)
-
-
Method Details
-
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
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 nameNullPointerException
- 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 interfacePortalFlag
- Returns:
The character representing this portal flag
-
isCustom
public boolean isCustom()- Specified by:
isCustom
in interfacePortalFlag
- Returns:
True if this flag is custom
-
isInternalFlag
public boolean isInternalFlag()Description copied from interface:PortalFlag
Gets whether this flag is an internal flagUser 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 interfacePortalFlag
- Returns:
True if this flag is user specifiable
-
parseFlags
Gets all portal flags present in the given string- Returns:
A set of all found portal flags
-
valueOf
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
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 interfacePortalFlag
- Returns:
Whether this flag relates to how a portal selects destinations
-