Info
Content

BungeeAPI

Set fallback / default server:

ServerInfo serverInfo;
BungeeCordApi.setFallbackServer(serverInfo);

Send user-defined data to cloud:

If you want to send data to the cloud, you can use this code. For the cloud to do something, you need to develop a plugin for the cloud that has a registered listener.

PacketDataConstructor packetDataConstructor = new PacketDataConstructor();
packetDataConstructor.add("key", "value");

OutgoingDataPacket outgoingDataPacket = new OutgoingDataPacket(packetDataConstructor);
SpigotApi.sendMessageToCloud(outgoingDataPacket);

Events:

All these events are registered as normal events (like the PlayerJoinEvent) in your spigot plugin.

To receive messages from your cloud plugin, you must register a listener with the following event:

CloudMessageReciveEvent

To see when a server's data was changed, you can use this event:

ServerAddEvent

To see when a server is offline, you can use this event:

ServerRemoveEvent

JavaDocs:

Here you find the JavaDocs: BungeeAPI JavaDocs

No Comments
Back to top