BungeeCordLib
BungeeCordLib is a Bukkit Lib for BungeeCord Servers. You can create TCP Servers and send Packets to a another BungeeCord Server.
Functions
- Create a TCP Server
- Send Packets to a TCP Server
- Get List with all Online Players (in all Servers) (!)
- Get right player address (!)
- Get the BungeeCord Name of this Server (!)
- List all Servers in BungeeCord List. (!)
- Teleport Players to other Servers
- Make a Ping to a Server (Get motd, Online Players and slots) Functions with (!) required online players.
Links
Source Code: http://github.com/Howaner/BungeeCordLib
Documentation: http://jd.howaner.de/BungeeCordLib
Code Examples
Teleport a Player:
BungeeServer server = BungeeCord.getManager().addServer("Servername", "127.0.0.1:2354"); server.teleportPlayer(player);
Ping a Server
BungeeServer server = BungeeCord.getManager().addServer("Servername", "127.0.0.1:2354"); //Servername = Der Name des Servers in der BungeeCord Config. 127.0.0.1:2354 = Ip des Servers ServerData data = server.getData(); if (data == null) { //Error } String motd = data.getMotd(); int slots = data.getSlots(); int players = data.getPlayers();
Get Player IP
@EventHandler public void onPlayerJoin(PlayerJoinEvent event) { final Player player = event.getPlayer(); Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() { player.sendMessage("IP: " + BungeeCord.getManager().getPlayerIp(player.getName()) + "!"); }, 5L); }
TCP Packet Connection
Example is on http://pastebin.howaner.de/view/0c7549f1
Repository Information for Maven Projects
<repositories> <repository> <id>Howaner Repo</id> <url>http://repo.howaner.de</url> </repository> </repositories> <dependencies> <dependency> <groupId>de.howaner</groupId> <artifactId>BungeeCordLib</artifactId> <version>1.2</version> </dependency> </dependencies>
It have a code?
Is crashing my plugin like can you explain were to put BungeeCordLib? ???
Why ? :'(
Well, nice job guy!!! Thank you very much.