Send message (Proxy)

Discussion in 'Spigot Plugin Development' started by Gamestyler113, May 10, 2015.

  1. 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 {
                            } catch (IOException e) {
                            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.
  2. This is the wrong place(you posted in Spigot Development, not Bungee Development). You may not be able to receive help in this forum!
  3. but this is a spigot plugin.. i dont know :/
  4. 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
  5. Get the server names with GetServers, get the players with PlayerList, send the message with Message.