Njol / Skript

Skript is a Bukkit plugin which allows server admins to customize their server easily, but without the hassle of programming a plugin or asking/paying someone to program a plugin for them.
http://njol.ch/projects/skript
104 stars 60 forks source link

[Feature] BungeeCord Capabilities #256

Open joshwenke opened 11 years ago

joshwenke commented 11 years ago

It would be cool for Skript to hook into BungeeCord, perhaps add a few events like teleporting players to other servers or sending messages to all servers, and conditions like checking if the server is online. Maybe something to get a list of all players on a specificed server as well?

I could use this to show a list of servers, and set a variable whether a server is online or not. Depending on the outcome, I could show "Online" or "Offline". I could move players to other servers and make custom commands to have users switch servers.

GrangerTheDog commented 10 years ago

I need that, i have an bungee server

leoforney commented 10 years ago

PLEASE PLEASE DO THAT NJOL!!!! I REALLY WOULD LIKE THIS BECAUSE I AM RUNNING A MINECRAFT SERVER NETWORK AND IT WOULD BE SOOOOOO COOOL!

Njol commented 10 years ago

I might add this eventually, though it might need more support as adding a plugin hook is more work than simply adding new Skript stuff.

Link for reference: http://www.spigotmc.org/wiki/bungeecord/

DaThresh commented 10 years ago

By more support do you mean people who want it? Because I'm guessing many people would LOVE the feature, including myself, but not everybody may come to this github post etc.

proferabg commented 10 years ago

Njol it is fairly simple but you probably already know that...but its just checking if Bungee exists then creating the plugin channel as that is what BungeeCord uses for teleportation and commands This is what i used in one of my plugins:

ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
dos.writeUTF("Connect");
dos.writeUTF("lobby"); //This being the name of the server to connect to
p.sendPluginMessage((Plugin) plugin, "BungeeCord", baos.toByteArray()); 
dos.close(); //dont forget to close
baos.close(); //not sure if this is the right order to close either but im pretty sure it is

Source: http://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/

joeuguce99 commented 10 years ago

Skript plus already adds support for this.

MostFunGuy commented 10 years ago

Not effectively though. Without reloading the skripts containing the bungee code, it "loses" connection after about ten minutes and all bungee cord functionality ceases to work (such as sending players from server to server)