Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean onCommand(CommandSender cs, org.bukkit.command.Command cmnd, String string, String[] strings) {
- if (string.equalsIgnoreCase("bountytop")) {
- List<String> uuids = new ArrayList<>(Main.data.getConfigurationSection("Players").getKeys(false));
- Collections.sort(uuids);
- Collections.sort(uuids, new Comparator<String>() {
- public int compare(String s1, String s2) {
- int s11 = Main.data.getInt("Bounty");
- int s22 = Main.data.getInt("Bounty");
- return new Integer(s11).compareTo(s22);
- }
- });
- cs.sendMessage(ChatColor.translateAlternateColorCodes('&', Main.config.getString("Messages.Header")));
- 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"));
- 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"));
- 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"));
- 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"));
- 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"));
- 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"));
- 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"));
- 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"));
- 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"));
- 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"));
- cs.sendMessage(ChatColor.translateAlternateColorCodes('&', Main.config.getString("Messages.Footer")));
- }
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement