Enum ServerId
- All Implemented Interfaces:
Serializable,Comparable<ServerId>,java.lang.constant.Constable
The live server a plugin runs on, as the unified API names it.
Read it with ctx.server(). Compare constants, never display names: a launcher may spell a server
"Roat Pkz", "roatpkz" or "ROAT_PKZ", and all of them are ROAT_PKZ.
UNKNOWN means PrivBot could not tell which server this is (or it is a server the SDK does not
publish). Treat it as "no capability is known", never as "Orion".
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionThe canonical name:Impact,Elorin,Orion,SpawnPK,Roat Pkz.static ServerIdLenient lookup by name: case and punctuation do not matter ("roat_pkz","Roat-Pkz"and"ROAT PKZ"are allROAT_PKZ), the enum name works too, and a longer launcher name that contains exactly one canonical name ("Orion RSPS") resolves to it.booleanisKnown()True for every published server, false forUNKNOWN.toString()static ServerIdReturns the enum constant of this type with the specified name.static ServerId[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
IMPACT
-
ELORIN
-
ORION
-
SPAWNPK
-
ROAT_PKZ
-
RAGNAR
-
UNKNOWN
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
displayName
The canonical name:Impact,Elorin,Orion,SpawnPK,Roat Pkz. -
isKnown
public boolean isKnown()True for every published server, false forUNKNOWN. -
toString
-
fromName
Lenient lookup by name: case and punctuation do not matter ("roat_pkz","Roat-Pkz"and"ROAT PKZ"are allROAT_PKZ), the enum name works too, and a longer launcher name that contains exactly one canonical name ("Orion RSPS") resolves to it. Null, blank, unpublished servers (Near Reality, OSPS, Ferox, Echo) and anything ambiguous areUNKNOWN.
-