BungeeServerAPI

BungeeServerAPI

201 Downloads

BungeeServer API

Please install the newest update if your current version is not working.

What is it?

BungeeServerAPI is an API for plugin developers to easily hook into. This plugin can send a player to another server on the bungee proxy, send a message to any player on the proxy, or kick any player. (Miscellaneous functions are also available)

Why to use it?

If you're a developer, you can make your server better, easier. Instead of coding everything to send a player to another server on the network, you can hook into this API and have them sent. For example, instead of kicking a player when they're afk, you can send them to the lobby.

How do I install?

- Download and put in your server's plugins folder, or any server plugin folder that

   also uses a plugin that requires this. (Server plugin file, not bungeecord plugin file).

- Restart server

How do I use it? (For developers)

If you're using eclipse, left-click your project name and then right click. Find "Build path" and find "Add external archives." If that option is not there, find "Configure build path" and press the button on the right saying "Add external JARs." Once you have the select file window, find the target server's BungeeServerAPI.jar, and select it. It should be added to the "Referenced Libraries" section. 

From there, you can use it with class BungeeServerAPI. 

Simple lobby command code:

To send a player: BungeeServerAPI.connect(Player player, String server);

To send a message: BungeeServerAPI.sendMessage(Player player, String message);

To kick a player: BungeeServerAPI.kickPlayer(Player player, String reason);

MISCELLANEOUS: BungeeServerAPI.miscellaneous(Player player, String utf, String variable); 

    To send a message it would look like: BungeeServerAPI.miscellaneous(player, "Message", "§c Stop being mean!");

Troubleshooting:

The glitch where it didn't know the plugin channel has been fixed in the recent update. If it still is not working for you, please add BungeeServerAPI.initializePluginChannel(); before using code from this. You should normally not have to do this, however, because now all functions will do this automatically.

Please report any other glitches, though, and I will attempt to fix them.

More features coming in future updates.