Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void updateScoreborad(Player player){
- FileConfiguration config = plugin.getConfig();
- for(String worldName : config.getConfigurationSection("Scoreboard").getKeys(false)){
- BPlayerBoard board = Netherboard.instance().getBoard(player);
- if(board == null){
- board = Netherboard.instance().createBoard(player, "NotCacha");
- }
- if(player.getWorld().getName().equals(worldName)){
- List<String> lines = config.getStringList("Scoreboard." + worldName + ".lines");
- String boardName = config.getString("Scoreboard." + worldName + ".title");
- for(int i = lines.size() -1 ;i >= 0 ; i--) {
- board.set(Utils.ChatColor(lines.get(i)), lines.size()-(i));
- }
- board.setName(Utils.ChatColor(boardName));
- }else{
- if(Netherboard.instance().getBoard(player) != null){
- Netherboard.instance().removeBoard(player);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment