Advertisement
Legt_Gaming1

Untitled

Jan 28th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 KB | None | 0 0
  1. public boolean onCommand(CommandSender cs, org.bukkit.command.Command cmnd, String string, String[] strings) {
  2. if (string.equalsIgnoreCase("bountytop")) {
  3. List<String> uuids = new ArrayList<>(Main.data.getConfigurationSection("Players").getKeys(false));
  4. Collections.sort(uuids);
  5. Collections.sort(uuids, new Comparator<String>() {
  6. public int compare(String s1, String s2) {
  7. int s11 = Main.data.getInt("Bounty");
  8. int s22 = Main.data.getInt("Bounty");
  9. return new Integer(s11).compareTo(s22);
  10.  
  11. }
  12. });
  13. cs.sendMessage(ChatColor.translateAlternateColorCodes('&', Main.config.getString("Messages.Header")));
  14. cs.sendMessage(ChatColor.YELLOW + "1. " + ChatColor.BLUE + Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(0))).getName() + ChatColor.YELLOW + " $" + Main.data.getInt("Players." + uuids.get(0) + ".Bounty"));
  15. cs.sendMessage(ChatColor.YELLOW + "2. " + ChatColor.BLUE + Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(1))).getName() + ChatColor.YELLOW + " $" + Main.data.getInt("Players." + uuids.get(1) + ".Bounty"));
  16. cs.sendMessage(ChatColor.YELLOW + "3. " + ChatColor.BLUE + Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(2))).getName() + ChatColor.YELLOW + " $" + Main.data.getInt("Players." + uuids.get(2) + ".Bounty"));
  17. cs.sendMessage(ChatColor.YELLOW + "4. " + ChatColor.BLUE + Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(3))).getName() + ChatColor.YELLOW + " $" + Main.data.getInt("Players." + uuids.get(3) + ".Bounty"));
  18. cs.sendMessage(ChatColor.YELLOW + "5. " + ChatColor.BLUE + Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(4))).getName() + ChatColor.YELLOW + " $" + Main.data.getInt("Players." + uuids.get(4) + ".Bounty"));
  19. cs.sendMessage(ChatColor.YELLOW + "6. " + ChatColor.BLUE + Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(5))).getName() + ChatColor.YELLOW + " $" + Main.data.getInt("Players." + uuids.get(5) + ".Bounty"));
  20. cs.sendMessage(ChatColor.YELLOW + "7. " + ChatColor.BLUE + Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(6))).getName() + ChatColor.YELLOW + " $" + Main.data.getInt("Players." + uuids.get(6) + ".Bounty"));
  21. cs.sendMessage(ChatColor.YELLOW + "8. " + ChatColor.BLUE + Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(7))).getName() + ChatColor.YELLOW + " $" + Main.data.getInt("Players." + uuids.get(7) + ".Bounty"));
  22. cs.sendMessage(ChatColor.YELLOW + "9. " + ChatColor.BLUE + Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(8))).getName() + ChatColor.YELLOW + " $" + Main.data.getInt("Players." + uuids.get(8) + ".Bounty"));
  23. cs.sendMessage(ChatColor.YELLOW + "10. " + ChatColor.BLUE + Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(9))).getName() + ChatColor.YELLOW + " $" + Main.data.getInt("Players." + uuids.get(9) + ".Bounty"));
  24. cs.sendMessage(ChatColor.translateAlternateColorCodes('&', Main.config.getString("Messages.Footer")));
  25. }
  26. return true;
  27. }
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement