Bungee - Proxy CommandSync 2.3

Synchronize console and player commands between multiple Minecraft server instances.

  1. YoFuzzy3

    Supporter

    YoFuzzy3 submitted a new resource:

    CommandSync - Synchronize commands between your connected Minecraft servers.

    Read more about this resource...
     
    • Useful Useful x 2
    • Agree Agree x 1
  2. Can the /sync cmd be run from the backend servers' console? o_O
     
  3. You did do it the way I was thinking in the end. I thought you may have used bungeecords forward channel eliminating the need for a bungeecord plugin
     
  4. YoFuzzy3

    Supporter

    You mean from the BungeeCord server console? That's how I originally did it but decided it would be better to make it a Bukkit command, just seems more useful like that. I could add a BungeeCord command ontop though, don't see the need however.

    Oh.. that sounds better. How does that work?
     
  5. Not sure as I haven't tested it yet


    Maybe something like this:
    Send this through the BungeeCord channel
    Code (Text):
    out.writeUTF("Forward");
    out.writeUTF("ALL");
    out.writeUTF("CommandSync"); //Or what ever you want to call the channel
    out.writeUTF("/command you want executed"); // The data.
     
    Then just have a plugin message listener listening on the BungeeCord channel with a subchannel of "CommandSync";

    Code (Text):
        @Override
        public void onPluginMessageReceived(String pluginChannel, Player reciever,
                byte[] message) {
            if (!pluginChannel
                    .equalsIgnoreCase("BungeeCord"))
                return;
     
            DataInputStream in = new DataInputStream(new ByteArrayInputStream(
                    message));
     
            String channel = null;
            try {
                channel = in.readUTF();
            } catch (IOException e) {
                e.printStackTrace();
            }
            If(!channel.equal("CommandSync")){
                    return;
            }
     
            String command= null;
            try {
                command= in.readUTF();
            } catch (IOException e) {
                e.printStackTrace();
            }
            if(command!=null){
              //execute command etc
            }
     

    No idea if this will work if there's no players online though. I think it may store the data until someone logs on
     
    • Useful Useful x 1
  6. YoFuzzy3

    Supporter

    bloodsplat
    That seems pretty nifty. I might try it out some time. :D
     
  7. Have you actually tested it? Not actually working.. Servers didn't stop. And yes, I have all plugins installed.

    [​IMG]
     
  8. YoFuzzy3

    Supporter

    Yes I've tested it and it worked for me. I forgot to mention that there needs to be at least one player online on a Minecraft server for commands to work, that's Bukkit and I can't do anything about it.
     
  9. Can't you just call ConsoleSender?
     
  10. YoFuzzy3

    Supporter

    No I can't. I just put the source on GitHub so you can see how it works.
     
  11. Hmm doesn't work for me. BC plugin installed, Bukkit plugins installed on all servers.
    Command "/sync" works and shows the help. (btw it says "Visit 'link' for help." ;-) Shouldn't there be any real link?!)

    But if I try to use it with:
    - /sync console all /broadcast test
    - /sync console main /broadcast test
    - /sync player derflash /ch p

    ... it says just "Type /Sync for help!"
    I have * permissions (owner) if that information helps.
     
  12. It adds 1 more every time I use the command. YoFuzzy3

    [​IMG]
     
  13. YoFuzzy3

    Supporter

    Ah that would be because you must use underscores to replace spaces in the commands. I'll add space support in the next update.

    That's odd, never happened to me when I was testing the plugin. Maybe I'll add some debug messages into the next version to try help solve the issue.
     
  14. Yes I'm getting the 5 spam as well and I'd really like to use this plugin.
    [​IMG]

    Update: I tried it with only me on the server and it displayed it once, then I swapped over to a server with me and 1 other person online and it displayed it twice. Thinking back there were 5 people online when I tried the message in the screenshot, so I think it's executing it once per person online. Hope that helps fix it!
     
    #14 Hugs, Jun 26, 2013
    Last edited: Jun 26, 2013
  15. I confirm that it is the amount of players on the server you execute it on
     
  16. Could you please enhance two things?

    1. Make the plugin NOT executes the command a tons of times when there are a tons of players, make it execute only one time.
    2. Make the plugin NOT uses the _ in messages because can cause a lot of problems with other plugins that use _ in different ways (also can be a problem with name that contain _ ; e.g. "name_of_a_guy").

    If you can modify this things the plugin would be the best ever :D
     

  17. Funny thing, I decompiled the plugin and he has replace "_" with " ", so not disallowing spaces would have done that anyway. Also, I don't think it's the plugins fault for executing the commands a billion times, the code looks solid and shouldn't be duplicating, I think it's a bungee error.
     
  18. So I can use " " instead of "_" normally, or will it be release in the future?
     

  19. Oh for now you have to use _ if you want spaces.
     
  20. Anyone want to try this version? http://i.lcrft.net/JFTZ it removes the need for _ so it's just /sync all /broadcast Lax is the most amazing person ever instead of "/broadcast_Lax_is_the_most_amazing_person_ever