Enum Class Platform
- All Implemented Interfaces:
Serializable,Comparable<Platform>,Constable
Enumeration of the two supported bridge platforms: the Velocity proxy and
backend servers.
Each constant identifies a category of server in the CommandBridge network.
Use the
factory methods backend(String) and velocity(String) to
construct typed
Platform.ServerTarget instances that can be passed to a message channel's
target builder.
// Target a specific backend server
Platform.ServerTarget survival = Platform.backend("survival-1");
// Target the Velocity proxy itself (multi-proxy setup)
Platform.ServerTarget proxy = Platform.velocity("proxy-1");
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordIdentifies a specific server in the bridge network by its unique identifier and platform type.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic Platform.ServerTargetCreates aPlatform.ServerTargetidentifying a backend server.Creates aPlatform.ServerTargetfor this platform with the given identifier.static PlatformReturns the enum constant of this class with the specified name.static Platform[]values()Returns an array containing the constants of this enum class, in the order they are declared.static Platform.ServerTargetCreates aPlatform.ServerTargetidentifying a Velocity proxy server.
-
Enum Constant Details
-
BACKEND
Represents a backend Minecraft server (for example, Paper, Folia, or Bukkit).Use this platform when targeting backend servers to send messages via a channel.
-
VELOCITY
Represents the Velocity proxy.Use this platform when targeting the proxy itself, for example in a multi-proxy setup where one Velocity instance acts as a client to another.
-
-
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
-
target
Creates aPlatform.ServerTargetfor this platform with the given identifier.- Parameters:
id- the unique server identifier- Returns:
- a new
ServerTargetbound to this platform - See Also:
-
backend
Creates aPlatform.ServerTargetidentifying a backend server.Equivalent to
BACKEND.target(id).- Parameters:
id- the unique server identifier- Returns:
- a
ServerTargetwith platformBACKEND
-
velocity
Creates aPlatform.ServerTargetidentifying a Velocity proxy server.Equivalent to
VELOCITY.target(id).- Parameters:
id- the unique server identifier- Returns:
- a
ServerTargetwith platformVELOCITY
-