hello! i code a ban plugin but i have a question. If i'm banning a player, i will that any player who have a permission that he gets the message: "xx was banned by yy". How can I do this? Code (Text): ByteArrayOutputStream b = new ByteArrayOutputStream(); DataOutputStream out = new DataOutputStream(b); for(Player o : Bukkit.getOnlinePlayers()) { try { out.writeUTF("Message"); out.writeUTF(o.getName()); out.writeUTF("testmsg"); } catch (IOException e) { e.printStackTrace(); } o.sendPluginMessage(this.plugin, "BungeeCord", b.toByteArray()); } It's not working.. All players who are in other bungee-servers and have a permissions should have the message.. I hope you understand what i mean. I try it too with: p.sendPluginMessage(this.plugin, "BungeeCord", b.toByteArray()); | It's not working.
This is the wrong place(you posted in Spigot Development, not Bungee Development). You may not be able to receive help in this forum!
I think you cant send a message with a spigot plugin to servers. I think you need a bungee plugin. And it doesnt work because you cant get the all players I think. (Bukkit.getOnlinePlayers() nly get gets all players from the spigot server not bungee
Get the server names with GetServers, get the players with PlayerList, send the message with Message.