Solved Sending a player to a bungee server

Discussion in 'Spigot Plugin Development' started by ckamps2020, May 13, 2016.

  1. Hey there!

    I know that this section of the forums is quite brutal on knowledge of Java. I know how to use google and I have searched for this topic and found some info. Let me explain.

    I am currently creating a framework for my network, and I'm working on more of the server based core. I created a compass and I need to send the player to a bungee server through this. I read about the "bungee messaging channel" but I am not too sure what this is used for. I know that you can't use methods such as player.performCommand().

    If you guys could possibly link me some documentation or maybe explain how I would send them via a compass that would be wonderful!

    Thanks for help in advanced! :)

    EDIT:

    Here is what I found for people who ever google this:

    Code (Text):
    public void sendPlayer(Player player, String server) {
        ByteArrayDataOutput out = ByteStreams.newDataOutput();
        out.writeUTF("ConnectOther");
        out.writeUTF(player.getName());
        out.writeUTF(server);
        player.sendPluginMessage(this, "BungeeCord", out.toByteArray());
    }
     
    #1 ckamps2020, May 13, 2016
    Last edited: May 14, 2016
    • Optimistic Optimistic x 1