Skip to content
Andrew edited this page Nov 2, 2016 · 1 revision

Currently, HubMagic only provides a single API, which is a plugin message facility running on the HubMagic channel.

ConnectHub

ConnectHub instructs HubMagic to reconnect this player to the hub, according to the default balancer. It is a player-specific message (will only connect the targeted player).

Sample code

ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("ConnectHub");
player.sendPluginMessage(MyPlugin.getPlugin(), "HubMagic", out.toByteArray());

Clone this wiki locally