Create you own Network Type (Hubber Backend)

Create Custom Network Backend

Hubber supports two major network types: BungeeCord and Lilypad; But, what happens if you have a network type that isn't one of those. Well Hubber has the option to set the backend to your own custom network type using HubberAPI#setBackend(Backend backend)


How to Create One

From this point on a network type will be called a backend

In order to create your own backend you need to implement the backend class that is provided with hubber. You then need to fill out the methods to suit your Custom Network. (Here is an example). A Description of the methods are below.

Method Descriptions

  • void send(Player player, String Server)
    • This uses the player object to send the player to to the server
    • This only works if the player object is not null (so the player has to be on the same server that the code is being ran from)
  • void send(final String playerName, final String server)
    • This uses the player name to send the player to the server
    • This will work as long as playerName is somewhere on the network (doesn't matter which server)

Comments

Posts Quoted:
Reply
Clear All Quotes