Config.yml String List in scoreboard

Status
This thread has been locked.

Coodings

Feedback score
0
Posts
38
Reactions
1
Resources
0
I know many will tell me to learn java, if you are going to tell me the same thing I better keep your words that do not interest me.

What I want to do is the following, I want to create a marker configuration in chain mode List, I also want to replace the varibles Deaths and killss by these variables %deaths%, %kills% someone helps me help with a small code´


Code:
public void run() {
        Player[] array;
        for (int j = (array = Bukkit.getOnlinePlayers()).length, i = 0; i < j; ++i) {
            final Player player = array[i];
            final ScoreboardHelper board = this.scoreboardHandler.getScoreboard(player);
            final File sa = new File("plugins/FusionFFA/stats.yml");
            final YamlConfiguration stats = YamlConfiguration.loadConfiguration(sa);
            final int kills = stats.getInt("players." + player.getName() + ".kills");
            final int deaths = stats.getInt("players." + player.getName() + ".deaths");
            board.clear();
            if (player.getLocation().getWorld().getName().equals("world")) {
                board.add(this.lines);
                board.add("&6&lName: &f" + player.getName());
                board.add("&f&l - &7Kills: &f" + kills);
                board.add("&f&l - &7Deaths: &f" + deaths);
                board.add("&f&l - &7Money:" );
                board.add(this.lines);
                board.add("&c     howlyhit.us" );
            }
          
            board.update(player);
        }
    }
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Aerosa

Feedback score
0
Posts
15
Reactions
5
Resources
0
Code:
for (String lines : stats.getStringList("PATH")) { 
     board.add(ChatColor.translateAlternateCodes('&', lines).replaceAll("%death%", deaths).replaceAll("%kills%", kills));
}
 

Coodings

Feedback score
0
Posts
38
Reactions
1
Resources
0
Code:
for (String lines : stats.getStringList("PATH")) {
     board.add(ChatColor.translateAlternateCodes('&', lines).replaceAll("%death%", deaths).replaceAll("%kills%", kills));
}


because I get that error, why is it a variable of type int?
LDa8BQz.png
 
Status
This thread has been locked.
Top