NotCachaaaaaaaaaa

Untitled

Mar 29th, 2020
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. public void updateScoreborad(Player player){
  2. FileConfiguration config = plugin.getConfig();
  3. for(String worldName : config.getConfigurationSection("Scoreboard").getKeys(false)){
  4. BPlayerBoard board = Netherboard.instance().getBoard(player);
  5. if(board == null){
  6. board = Netherboard.instance().createBoard(player, "NotCacha");
  7. }
  8. if(player.getWorld().getName().equals(worldName)){
  9. List<String> lines = config.getStringList("Scoreboard." + worldName + ".lines");
  10. String boardName = config.getString("Scoreboard." + worldName + ".title");
  11. for(int i = lines.size() -1 ;i >= 0 ; i--) {
  12. board.set(Utils.ChatColor(lines.get(i)), lines.size()-(i));
  13. }
  14. board.setName(Utils.ChatColor(boardName));
  15. }else{
  16. if(Netherboard.instance().getBoard(player) != null){
  17. Netherboard.instance().removeBoard(player);
  18. }
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment