Send Player to another Server

Discussion in 'Spigot Plugin Development' started by MultiDJRoni, Jun 9, 2016.

  1. Hey!

    Im conding on a Item witch send the Player who Clicks on the Item to the Server "1vs1"

    My Code:
    Code (Text):
                        if(e.getItem().getItemMeta().getDisplayName().equalsIgnoreCase(ChatColor.DARK_GREEN + "1vs1")){
                            Player p = e.getPlayer();
                            Clear(p);
                           
                           
                            out.writeUTF("Connect");
                            out.writeUTF(p);
                            out.writeUTF("1vs1");
    But it does not get the "Out": [​IMG]

    I also tried it without the Player p = e.getPlayer() and the out.writeITF(p).

    Here is the full code of the LListener Class: https://paste.ee/p/9WpWH
    And Here of the Main: https://paste.ee/p/IPi2z

    Thanks for your help ;)

    If that is the wrong Forum for that, please move it :)
     
  2. MiniDigger

    Supporter

    reread this https://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/
    you need to define your output stream, register then channel and stuff.
     
  3. Remove "out.writeUTF(p);"
     
  4. Inkzzz

    Resource Staff

    Define the variable and read above