Code (Java): public final void connect(Player player, String server) { ByteArrayOutputStream b = new ByteArrayOutputStream(); DataOutputStream out = new DataOutputStream(b); try { out.writeUTF("Connect"); out.writeUTF(server); } catch (IOException e) { } player.sendPluginMessage(Main.getPlugin(), "BungeeCord", b.toByteArray()); // ERROR HERE } So I was trying to allow players to connect using this but it doesn't seem to work, yes the server I have it with actually exists so it should be working. What am I doing wrong? The plugin is not null.
In main class in onEnable add Code (Java): getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");