Would this work? "/gstop"

Discussion in 'BungeeCord Help' started by Den, Jun 22, 2015.

  1. Den


    So I have all of my server's on auto-restart, and auto-update (100% custom coded), and I want to add a command /gstop that would /stop all of the servers, now I'm asking would this work?

    So first I make my Foward channel
    Code (Text):

    Write UTF into it
    Code (Text):

    ByteArrayOutputStream msgbytes = newByteArrayOutputStream();
    DataOutputStream msgout = newDataOutputStream(msgbytes);

    So okay the message is sent to all of the servers, now I catch the message
    Code (Text):

    String subchannel = in.readUTF();
    if (subchannel.equalsIgnoreCase("cmd")) {
        Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), in.readUTF());
    In theory it would work, but will there be security issues or bungee won't even allow that?
  2. I think your right its best just to set all your server to restart at the same time but most of the time what I do is bungee restarts every 6 days in the night and I have all my other server but the hub restart in different time to stop lag at the lobby and to allow more uptime.

    Bungee: 6 days
    Hub: 3 days
    Skyblock: 1 day
    Creative: 1 day
  3. No security issues, bungee would allow it
  4. Den


    Yah, I got it to work, but you need a player inside that server for it to work and you would need to use sockets for that :/

    I need /gstop to stop all of the servers to update, I have auto-update and restart upon /stop, and /stop-ing 10 server's ain't fun, and on SHH its even harder...