Class RexlCloudBridge
java.lang.Object
de.rexlcloud.bridge.RexlCloudBridge
Connects a Minestom server that rexlCloud started from a "Custom jar" group to its wrapper. In the server's main:
var cloud = RexlCloudBridge.getInstance();
var server = MinecraftServer.init(cloud.getAuth());
// ... instances, events ...
cloud.initialize();
server.start("0.0.0.0", cloud.getPort());
Everything comes from the cloud.json the wrapper writes into the server's folder before each start. Outside
the cloud (no cloud.json), isCloudServer() is false, getPort() returns 25565 and
initialize() does nothing, so the same jar can be started locally for testing.
-
Method Summary
Modifier and TypeMethodDescriptionnet.minestom.server.AuthgetAuth()How players reach the server, matching the cloud's proxies: Velocity modern forwarding with the network's secret, BungeeCord forwarding, or offline mode outside the cloud.List<de.rexlcloud.core.network.packets.PlayerTeleportPacket> Teleports for players that are still joining, done once they are loaded.static RexlCloudBridgeintgetPort()The port the server has to listen on.@Nullable UUID@Nullable StringWhich template variant (e.g.intde.rexlcloud.core.network.WrapperReconnectThe secret this run proves itself with to the wrapper.voidConnects to the wrapper and handles the cloud's player teleports.booleanWhether the server was started by rexlCloud.booleanvoidsetRexlCloudApi(RexlCloudApi rexlCloudApi) voidsetShutdownHook(Runnable onShutdown) What happens when the cloud stops the server or the wrapper goes away.void
-
Method Details
-
isCloudServer
public boolean isCloudServer()Whether the server was started by rexlCloud. -
getServerName
-
getServerKey
-
getPort
public int getPort()The port the server has to listen on. -
getTemplateVariant
Which template variant (e.g. map) the server got, "default" if its group has none. -
isMaintenance
public boolean isMaintenance() -
getAuth
public net.minestom.server.Auth getAuth()How players reach the server, matching the cloud's proxies: Velocity modern forwarding with the network's secret, BungeeCord forwarding, or offline mode outside the cloud. Pass it toMinecraftServer.init. -
getWrapperPort
public int getWrapperPort() -
getWrapperToken
The secret this run proves itself with to the wrapper. -
initialize
public void initialize()Connects to the wrapper and handles the cloud's player teleports. Call it once, afterMinecraftServer.init. Without a cloud.json it does nothing. -
setShutdownHook
What happens when the cloud stops the server or the wrapper goes away. By default the server stops and the process exits. -
shutdownServer
public void shutdownServer() -
getInstance
-
getRexlCloudApi
-
setRexlCloudApi
-
getBufferedPlayerTeleports
Teleports for players that are still joining, done once they are loaded. -
getWrapperReconnect
public de.rexlcloud.core.network.WrapperReconnect getWrapperReconnect()
-