1.8.8 Need help executing bungee plugin using spigot.

Discussion in 'Spigot Plugin Development' started by TGG2006, Jul 31, 2020.

  1. Hello. I am trying to make the player execute a bungee plugin through spigot. If possible, I don't want a Bungee plugin to be used for this. Thanks!
     
  2. Can you explain more? What do you mean "execute a bungee plugin through spigot"?
     
  3. Sorry, typo. I meant execute a command through bungee for the player to use
     
  4. I did google it beforehand, but I've seen other plugins do this without the use of a Bungeecord plugin, so those results weren't that relevant to what I want.
     
  5. No you haven't, it's literally impossible.
     
  6. I have a plugin that does this without the use of a Bungeecord plugin in the Bungeecord folder. Its not impossible.
     
  7. Well send a link to it then
     
  8. What's the plugin?
     
  9. Check this out

    Edit: nvm I forgot that the asker asked for a bungee-only plugin
     
  10. They changed it to a UHC plugin for some reason, but theres a YouTube link of it.
     
  11. It requires a Spigot plugin too
     
  12. Thats a completely different plugin then the one I'm talking about
     
  13. This is literally impossible. The only built-in way (outside of the standard Minecraft protocol) that Spigot servers can communicate with the Bungee proxy is via plugin messaging. There are a few standard messages that a Spigot plugin can send, but there isn't one that allows it to execute a command on Bungee. The only way to achieve that is to add it yourself, using a Bungee plugin.

    There is no reason to not use a Bungee plugin. Adding a simple plugin that listens to a message on the plugin messaging channel will not impact performance at all. And if for some reason, you really do not want to add a simple 1kb plugin, you will just have to deal with the fact that you cannot do this.

    @Brxen He wants a Spigot plugin that executes Bungee commands, not a Bungee plugin that executes a Spigot command
     
  14. Code?
     
  15. Tested using the same code the guy used.

    In Main class:

    Code (Java):
        public static void sendBungee(Player p) {
            ByteArrayOutputStream b = new ByteArrayOutputStream();
            DataOutputStream out = new DataOutputStream(b);
            try {
                out.writeUTF("Message");
                out.writeUTF("alert hi");
                out.writeUTF("Message");
                out.writeUTF("subFN"); // or "ALL"
                out.writeUTF("blah!");
            } catch(Exception e) {
                e.printStackTrace();
            }
           
           

            p.sendPluginMessage(getPlugin(Main.class), "BungeeCord", b.toByteArray());
        }
    Executing in other class:

    Code (Java):
    Main.sendBungee(p);
     
  16. Put some system.ou.println("step 1,2...) in your Code, so you can see If alle is executed !
     
  17. Everythings being executed, but I am not getting the bungee output.