Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.legitgaming1.ReeveBounty;
- import java.util.ArrayList;
- import java.util.Collections;
- import java.util.Comparator;
- import java.util.List;
- import java.util.UUID;
- import org.bukkit.Bukkit;
- import org.bukkit.ChatColor;
- import org.bukkit.command.CommandExecutor;
- import org.bukkit.command.CommandSender;
- public class BountyTop implements CommandExecutor{
- /*
- * Developed By Legit_Gaming1 || SirHairyBacca
- * Private Plugin For ReeveNetwork
- * Inspired By PyroFT
- *
- */
- public boolean onCommand(CommandSender cs, org.bukkit.command.Command cmnd, String string, String[] strings) {
- if (string.equalsIgnoreCase("bountytop")) {
- List<String> uuids = new ArrayList<>(Bounty.getPlugin().getData().getConfigurationSection("Players").getKeys(false));
- Collections.sort(uuids, new Comparator<String>() {
- public int compare(String s1, String s2) {
- int s11 = Bounty.getPlugin().getData().getInt("Players." + s1 + ".Bounty");
- int s22 = Bounty.getPlugin().getData().getInt("Players." + s2 + ".Bounty");
- return s22 - s11;
- }
- });
- cs.sendMessage(ChatColor.translateAlternateColorCodes('&', Bounty.getPlugin().getCfg().getString("Messages.Header")));
- cs.sendMessage(ChatColor.translateAlternateColorCodes('&', Bounty.getPlugin().getCfg().getString("Top10.1").replace("%bounty%", Bounty.getPlugin().getData().getString("Players." + uuids.get(0) + ".Bounty")).replace("%name%", Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(0))).getName())));
- cs.sendMessage(ChatColor.translateAlternateColorCodes('&', Bounty.getPlugin().getCfg().getString("Top10.2").replace("%bounty%", Bounty.getPlugin().getData().getString("Players." + uuids.get(1) + ".Bounty")).replace("%name%", Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(1))).getName())));
- cs.sendMessage(ChatColor.translateAlternateColorCodes('&', Bounty.getPlugin().getCfg().getString("Top10.3").replace("%bounty%", Bounty.getPlugin().getData().getString("Players." + uuids.get(2) + ".Bounty")).replace("%name%", Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(2))).getName())));
- cs.sendMessage(ChatColor.translateAlternateColorCodes('&', Bounty.getPlugin().getCfg().getString("Top10.4").replace("%bounty%", Bounty.getPlugin().getData().getString("Players." + uuids.get(3) + ".Bounty")).replace("%name%", Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(3))).getName())));
- cs.sendMessage(ChatColor.translateAlternateColorCodes('&', Bounty.getPlugin().getCfg().getString("Top10.5").replace("%bounty%", Bounty.getPlugin().getData().getString("Players." + uuids.get(4) + ".Bounty")).replace("%name%", Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(4))).getName())));
- cs.sendMessage(ChatColor.translateAlternateColorCodes('&', Bounty.getPlugin().getCfg().getString("Top10.6").replace("%bounty%", Bounty.getPlugin().getData().getString("Players." + uuids.get(5) + ".Bounty")).replace("%name%", Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(5))).getName())));
- cs.sendMessage(ChatColor.translateAlternateColorCodes('&', Bounty.getPlugin().getCfg().getString("Top10.7").replace("%bounty%", Bounty.getPlugin().getData().getString("Players." + uuids.get(6) + ".Bounty")).replace("%name%", Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(6))).getName())));
- cs.sendMessage(ChatColor.translateAlternateColorCodes('&', Bounty.getPlugin().getCfg().getString("Top10.8").replace("%bounty%", Bounty.getPlugin().getData().getString("Players." + uuids.get(7) + ".Bounty")).replace("%name%", Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(7))).getName())));
- cs.sendMessage(ChatColor.translateAlternateColorCodes('&', Bounty.getPlugin().getCfg().getString("Top10.9").replace("%bounty%", Bounty.getPlugin().getData().getString("Players." + uuids.get(8) + ".Bounty")).replace("%name%", Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(8))).getName())));
- cs.sendMessage(ChatColor.translateAlternateColorCodes('&', Bounty.getPlugin().getCfg().getString("Top10.10").replace("%bounty%", Bounty.getPlugin().getData().getString("Players." + uuids.get(9) + ".Bounty")).replace("%name%", Bukkit.getOfflinePlayer(UUID.fromString(uuids.get(9))).getName())));
- cs.sendMessage(ChatColor.translateAlternateColorCodes('&', Bounty.getPlugin().getCfg().getString("Messages.Footer")));
- uuids.clear();
- }
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement