<commit_before>package tk.royalcraf.rcommands;

import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

import tk.royalcraf.royalcommands.RoyalCommands;

public class List implements CommandExecutor {

	RoyalCommands plugin;

	public List(RoyalCommands plugin) {
		this.plugin = plugin;
	}

	@Override
	public boolean onCommand(CommandSender cs, Command cmd, String label,
			String[] args) {
		if (cmd.getName().equalsIgnoreCase("list")) {
			if (!plugin.isAuthorized(cs, "rcmds.list")) {
				cs.sendMessage(ChatColor.RED
						+ "You don't have permission for that!");
				plugin.log.warning("[RoyalCommands] " + cs.getName()
						+ " was denied access to the command!");
				return true;
			}
			Player p[] = plugin.getServer().getOnlinePlayers();
			String ps = "";
			int hid = 0;
			for (int i = 0; i < p.length; i++) {
				if (!plugin.isVanished(p[i])) {
					if (ps == "") {
						ps = ps.concat(p[i].getName());
					} else {
						ps = ps.concat(", " + p[i].getName());
					}
				} else {
					hid++;
				}
			}
			if (plugin.isAuthorized(cs, "rcmds.seehidden")) {
				if (hid > 0) {
					cs.sendMessage(ChatColor.BLUE + "There are currently "
							+ ChatColor.GRAY + (p.length - hid) + "/" + hid
							+ ChatColor.BLUE + " out of " + ChatColor.GRAY
							+ plugin.getServer().getMaxPlayers()
							+ ChatColor.BLUE + " players online.");
				} else {
					cs.sendMessage(ChatColor.BLUE + "There are currently "
							+ ChatColor.GRAY + p.length + ChatColor.BLUE
							+ " out of a maximum of " + ChatColor.GRAY
							+ plugin.getServer().getMaxPlayers()
							+ ChatColor.BLUE + " players online.");
				}
				for (int i = 0; i < p.length; i++) {
					if (plugin.isVanished(p[i])) {
						if (ps == "") {
							ps = ps.concat(ChatColor.GRAY + "[HIDDEN]"
									+ ChatColor.WHITE + p[i].getName());
						} else {
							ps = ps.concat(", " + ChatColor.GRAY + "[HIDDEN]"
									+ ChatColor.WHITE + p[i].getName());
						}
					}
				}
			} else {
				cs.sendMessage(ChatColor.BLUE + "There are currently "
						+ ChatColor.GRAY + (p.length - hid) + ChatColor.BLUE
						+ " out of a maximum of " + ChatColor.GRAY
						+ plugin.getServer().getMaxPlayers() + ChatColor.BLUE
						+ " players online.");
			}
			cs.sendMessage("Online Players: " + ps);<commit_msg>Fixed: Shortened list of players for real<commit_after>package tk.royalcraf.rcommands;

import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

import tk.royalcraf.royalcommands.RoyalCommands;

public class List implements CommandExecutor {

	RoyalCommands plugin;

	public List(RoyalCommands plugin) {
		this.plugin = plugin;
	}

	@Override
	public boolean onCommand(CommandSender cs, Command cmd, String label,
			String[] args) {
		if (cmd.getName().equalsIgnoreCase("list")) {
			if (!plugin.isAuthorized(cs, "rcmds.list")) {
				cs.sendMessage(ChatColor.RED
						+ "You don't have permission for that!");
				plugin.log.warning("[RoyalCommands] " + cs.getName()
						+ " was denied access to the command!");
				return true;
			}
			Player p[] = plugin.getServer().getOnlinePlayers();
			String ps = "";
			int hid = 0;
			for (int i = 0; i < p.length; i++) {
				if (!plugin.isVanished(p[i])) {
					if (ps == "") {
						ps = ps.concat(p[i].getName());
					} else {
						ps = ps.concat(", " + p[i].getName());
					}
				} else {
					hid++;
				}
			}
			if (plugin.isAuthorized(cs, "rcmds.seehidden")) {
				if (hid > 0) {
					cs.sendMessage(ChatColor.BLUE + "There are currently "
							+ ChatColor.GRAY + (p.length - hid) + "/" + hid
							+ ChatColor.BLUE + " out of " + ChatColor.GRAY
							+ plugin.getServer().getMaxPlayers()
							+ ChatColor.BLUE + " players online.");
				} else {
					cs.sendMessage(ChatColor.BLUE + "There are currently "
							+ ChatColor.GRAY + p.length + ChatColor.BLUE
							+ " out of " + ChatColor.GRAY
							+ plugin.getServer().getMaxPlayers()
							+ ChatColor.BLUE + " players online.");
				}
				for (int i = 0; i < p.length; i++) {
					if (plugin.isVanished(p[i])) {
						if (ps == "") {
							ps = ps.concat(ChatColor.GRAY + "[HIDDEN]"
									+ ChatColor.WHITE + p[i].getName());
						} else {
							ps = ps.concat(", " + ChatColor.GRAY + "[HIDDEN]"
									+ ChatColor.WHITE + p[i].getName());
						}
					}
				}
			} else {
				cs.sendMessage(ChatColor.BLUE + "There are currently "
						+ ChatColor.GRAY + (p.length - hid) + ChatColor.BLUE
						+ " out of a maximum of " + ChatColor.GRAY
						+ plugin.getServer().getMaxPlayers() + ChatColor.BLUE
						+ " players online.");
			}
			cs.sendMessage("Online Players: " + ps);
{'fraction_non_alphanumeric': 0.1574169589436765, 'fraction_numerical': 0.0016505054672993605, 'mean_word_length': 2.672727272727273, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '805032', 'n_tokens_mistral': 2116, 'n_tokens_neox': 1625, 'n_words': 344}