Discussion in 'Spigot Plugin Development' started by MrHardyCZ, Apr 8, 2016.

  1. Hi all, how do I create to the scoreboard display Moneys Players Online? (like %money% and %online_players%)
    Thanks! :)
  2. You can use FeatherBoard or to get the online player use Bukkit.getServer().getOnlinePlayers().size(); and to get thjeir mopney use vault api
  3. Use this
    Code (Text):
            static ArrayList<String> A = new ArrayList<String>();

                  final ScoreboardManager manager = Bukkit.getScoreboardManager();
            final Scoreboard board = manager.getNewScoreboard();
            Team team = null;
        private void setScoreboard()
            ScoreboardManager manager = Bukkit.getScoreboardManager();
            Scoreboard board = manager.getNewScoreboard();
            Objective main = board.registerNewObjective(ChatColor.GREEN + "Title", "Money");
            for (UUID s : getPlayers()) {
              if (Bukkit.getPlayer(s) != null)
                Player player = Bukkit.getPlayer(s);
            scoreboard = board;
    and replace " Main.econ.getBalance(player);" by something you want in your scoreboard.
  4. String line1 = plugin.getConfig().getString("ScoreBoardLineOne");
    line1 = line1.replace("%money", player.getBalance());