Class BungeeCord not found

Discussion in 'BungeeCord Plugin Development' started by iTokajo, Apr 1, 2013.

  1. Hello, I have a small problem, when i try to get list of servers with BungeeCord.getInstance().getServers(); Server throws lot of errors (Class BungeeCord not found)

    I have no idea what to do with it.

    Code (Text):
        public void onSignChange(SignChangeEvent e) {
            String[] lines = e.getLines();
            final String server = lines[1];
            e.setLine(0, "[" + ChatColor.BOLD + ChatColor.DARK_RED + "TheWalls" + ChatColor.RESET + ChatColor.BLACK + "]");
            e.setLine(1, ChatColor.YELLOW + server);
            e.setLine(3, String.valueOf(BungeeCord.getInstance().getServers().get(server).getPlayers().size()));
    Thanks for any help
  2. YoFuzzy3


    BungeeCord isn't a Bukkit plugin, you can't access it from a Bukkit plugin.
  3. So, what should I do? I have spigot servers, BungeeCord runs well, but for plugins I am using bukkit api, becouse i couldn't find any spigot api.
  4. YoFuzzy3


    Only BungeeCord plugins can use the BungeeCord API. However, if you want things such as the amount of players online using a Bukkit plugin you can use a thing called Plugin Messaging. There's a tutorial here.

    Edit: LaxWasHere ninja'd me. -.-
  5. Thank you very much!
  6. rawr.
    • Disagree Disagree x 1
  7. Mhh, one more thing. In this tutorial isnt described how to read input after sending message, do you know how to do it?