// Path: src/main/java/de/simonsator/partyandfriends/admin/commands/subcommands/DeletePlayerAdminSubCommand.java
// public class DeletePlayerAdminSubCommand extends AdminSubCommand {
// 	private final TextComponent DISCONNECT_MESSAGE = new TextComponent(TextComponent.fromLegacyText("Disconnected from server"));
// 	private final TextComponent PLAYER_IS_ON_OTHER_BUNGEE = new TextComponent(TextComponent.fromLegacyText("Could not delete player data. Player is playing on a different bungeecord which is connected to this one with redisbungee"));
// 
// 	public DeletePlayerAdminSubCommand(String pPrefix) {
// 		super(new String[]{"deleteplayer", "delete"}, 1, "§5pafadmin delete [Player] §8- §7Deletes all data of the given player which were saved by PAF", pPrefix);
// 	}
// 
// 	@Override
// 	public void onCommand(CommandSender sender, String[] args) {
// 		if (!isPlayerGiven(sender, args))
// 			return;
// 		PAFPlayer playerQuery = PAFPlayerManager.getInstance().getPlayer(args[1]);
// 		if (!doesPlayerExist(sender, playerQuery))
// 			return;
// 		if (playerQuery instanceof OnlinePAFPlayer) {
// 			OnlinePAFPlayer onlinePAFPlayer = (OnlinePAFPlayer) playerQuery;
// 			if (onlinePAFPlayer.getPlayer() == null) {
// 				sender.sendMessage(PLAYER_IS_ON_OTHER_BUNGEE);
// 				return;
// 			} else
// 				onlinePAFPlayer.getPlayer().disconnect(DISCONNECT_MESSAGE);
// 		}
// 		playerQuery.deleteAccount();
// 		sender.sendMessage(new TextComponent(TextComponent.fromLegacyText(Main.getInstance().getMessages().getString("PAFAdmin.Command.DeletePlayer.PlayerDeleted").replace("[PLAYER]", args[1]))));
// 	}
// 
// 	private boolean doesPlayerExist(CommandSender sender, PAFPlayer pGivenPlayer) {
// 		if (!pGivenPlayer.doesExist()) {
// 			sendError(sender, "Friends.General.DoesNotExist");
// 			return false;
// 		}
// 		return true;
// 	}
// 
// 	protected boolean isPlayerGiven(CommandSender pPlayer, String[] args) {
// 		if (args.length < 2) {
// 			sendError(pPlayer, "Friends.General.NoPlayerGiven");
// 			return false;
// 		}
// 		return true;
// 	}
// 
// }
// 
// Path: src/main/java/de/simonsator/partyandfriends/api/AdminCommand.java
// public abstract class AdminCommand<T extends AdminSubCommand> extends Command {
// 	private final List<T> subCommands = new ArrayList<>();
// 	private final TextComponent MUST_BE_EXECUTED_BY_CONSOLE = new TextComponent(TextComponent.fromLegacyText(Main.getInstance().getMessages().getString("PAFAdmin.Command.MustBeExecutedByConsole")));
// 
// 	public AdminCommand(String... aliases) {
// 		super(aliases[0], "dsioihusdugb", aliases);
// 	}
// 
// 	protected List<T> getSubCommands() {
// 		return subCommands;
// 	}
// 
// 	public void addSubcommand(T pSubCommand) {
// 		subCommands.add(pSubCommand);
// 	}
// 
// 	@Override
// 	public void execute(CommandSender commandSender, String[] args) {
// 		if (commandSender instanceof ProxiedPlayer) {
// 			commandSender.sendMessage(MUST_BE_EXECUTED_BY_CONSOLE);
// 			return;
// 		}
// 		executeCommand(commandSender, args);
// 	}
// 
// 	protected abstract void executeCommand(CommandSender commandSender, String[] args);
// }
// 
// Path: src/main/java/de/simonsator/partyandfriends/api/AdminSubCommand.java
// public abstract class AdminSubCommand extends SubCommand {
// 
// 	protected AdminSubCommand(String[] pCommands, int pPriority, String pHelp, String pPrefix) {
// 		super(pCommands, pPriority, pHelp, pPrefix);
// 	}
// 
// 	public abstract void onCommand(CommandSender sender, String[] args);
// 
// 	/**
// 	 * Ignored
// 	 *
// 	 * @param ignored  Ignored
// 	 * @param ignored2 Ignored
// 	 */
// 	@Override
// 	public void onCommand(OnlinePAFPlayer ignored, String[] ignored2) {
// 	}
// 
// 	public void sendError(CommandSender pCommandSender, TextComponent pMessage) {
// 		pCommandSender.sendMessage(pMessage);
// 		pCommandSender.sendMessage(HELP);
// 	}
// 
// 	public void sendError(CommandSender pCommandSender, String pIdentifier) {
// 		sendError(pCommandSender, new TextComponent(TextComponent.fromLegacyText(PREFIX + Main.getInstance().getMessages().getString(pIdentifier))));
// 	}
// 
// }


import de.simonsator.partyandfriends.admin.commands.subcommands.DeletePlayerAdminSubCommand;
import de.simonsator.partyandfriends.api.AdminCommand;
import de.simonsator.partyandfriends.api.AdminSubCommand;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.chat.TextComponent;
package de.simonsator.partyandfriends.admin.commands;


public class PAFAdminCommand extends AdminCommand<AdminSubCommand> {
	private final String PREFIX = "§8[§5PAFAdmin§8]§r§7 ";
	private final TextComponent COMMAND_MESSAGE_BEGIN = new TextComponent(TextComponent.fromLegacyText(
			"§8§m--------------------§8[§5§lPAFADMIN§8]§m--------------------"));
	private final TextComponent COMMAND_MESSAGE_END = new TextComponent(TextComponent.fromLegacyText(
			"§8§m-----------------------------------------------------"));
	private final TextComponent SUB_COMMAND_DOES_NOT_EXIST = new TextComponent(TextComponent.fromLegacyText(PREFIX
			+ "§cThe command does not exist."));

	public PAFAdminCommand(String... aliases) {
		super(aliases);
		addSubcommand(new DeletePlayerAdminSubCommand(PREFIX));
	}

	@Override
	protected void executeCommand(CommandSender commandSender, String[] args) {
		if (args.length == 0) {
			commandSender.sendMessage(COMMAND_MESSAGE_BEGIN);
// Path: src/main/java/de/simonsator/partyandfriends/admin/commands/subcommands/DeletePlayerAdminSubCommand.java
// public class DeletePlayerAdminSubCommand extends AdminSubCommand {
// 	private final TextComponent DISCONNECT_MESSAGE = new TextComponent(TextComponent.fromLegacyText("Disconnected from server"));
// 	private final TextComponent PLAYER_IS_ON_OTHER_BUNGEE = new TextComponent(TextComponent.fromLegacyText("Could not delete player data. Player is playing on a different bungeecord which is connected to this one with redisbungee"));
// 
// 	public DeletePlayerAdminSubCommand(String pPrefix) {
// 		super(new String[]{"deleteplayer", "delete"}, 1, "§5pafadmin delete [Player] §8- §7Deletes all data of the given player which were saved by PAF", pPrefix);
// 	}
// 
// 	@Override
// 	public void onCommand(CommandSender sender, String[] args) {
// 		if (!isPlayerGiven(sender, args))
// 			return;
// 		PAFPlayer playerQuery = PAFPlayerManager.getInstance().getPlayer(args[1]);
// 		if (!doesPlayerExist(sender, playerQuery))
// 			return;
// 		if (playerQuery instanceof OnlinePAFPlayer) {
// 			OnlinePAFPlayer onlinePAFPlayer = (OnlinePAFPlayer) playerQuery;
// 			if (onlinePAFPlayer.getPlayer() == null) {
// 				sender.sendMessage(PLAYER_IS_ON_OTHER_BUNGEE);
// 				return;
// 			} else
// 				onlinePAFPlayer.getPlayer().disconnect(DISCONNECT_MESSAGE);
// 		}
// 		playerQuery.deleteAccount();
// 		sender.sendMessage(new TextComponent(TextComponent.fromLegacyText(Main.getInstance().getMessages().getString("PAFAdmin.Command.DeletePlayer.PlayerDeleted").replace("[PLAYER]", args[1]))));
// 	}
// 
// 	private boolean doesPlayerExist(CommandSender sender, PAFPlayer pGivenPlayer) {
// 		if (!pGivenPlayer.doesExist()) {
// 			sendError(sender, "Friends.General.DoesNotExist");
// 			return false;
// 		}
// 		return true;
// 	}
// 
// 	protected boolean isPlayerGiven(CommandSender pPlayer, String[] args) {
// 		if (args.length < 2) {
// 			sendError(pPlayer, "Friends.General.NoPlayerGiven");
// 			return false;
// 		}
// 		return true;
// 	}
// 
// }
// 
// Path: src/main/java/de/simonsator/partyandfriends/api/AdminCommand.java
// public abstract class AdminCommand<T extends AdminSubCommand> extends Command {
// 	private final List<T> subCommands = new ArrayList<>();
// 	private final TextComponent MUST_BE_EXECUTED_BY_CONSOLE = new TextComponent(TextComponent.fromLegacyText(Main.getInstance().getMessages().getString("PAFAdmin.Command.MustBeExecutedByConsole")));
// 
// 	public AdminCommand(String... aliases) {
// 		super(aliases[0], "dsioihusdugb", aliases);
// 	}
// 
// 	protected List<T> getSubCommands() {
// 		return subCommands;
// 	}
// 
// 	public void addSubcommand(T pSubCommand) {
// 		subCommands.add(pSubCommand);
// 	}
// 
// 	@Override
// 	public void execute(CommandSender commandSender, String[] args) {
// 		if (commandSender instanceof ProxiedPlayer) {
// 			commandSender.sendMessage(MUST_BE_EXECUTED_BY_CONSOLE);
// 			return;
// 		}
// 		executeCommand(commandSender, args);
// 	}
// 
// 	protected abstract void executeCommand(CommandSender commandSender, String[] args);
// }
// 
// Path: src/main/java/de/simonsator/partyandfriends/api/AdminSubCommand.java
// public abstract class AdminSubCommand extends SubCommand {
// 
// 	protected AdminSubCommand(String[] pCommands, int pPriority, String pHelp, String pPrefix) {
// 		super(pCommands, pPriority, pHelp, pPrefix);
// 	}
// 
// 	public abstract void onCommand(CommandSender sender, String[] args);
// 
// 	/**
// 	 * Ignored
// 	 *
// 	 * @param ignored  Ignored
// 	 * @param ignored2 Ignored
// 	 */
// 	@Override
// 	public void onCommand(OnlinePAFPlayer ignored, String[] ignored2) {
// 	}
// 
// 	public void sendError(CommandSender pCommandSender, TextComponent pMessage) {
// 		pCommandSender.sendMessage(pMessage);
// 		pCommandSender.sendMessage(HELP);
// 	}
// 
// 	public void sendError(CommandSender pCommandSender, String pIdentifier) {
// 		sendError(pCommandSender, new TextComponent(TextComponent.fromLegacyText(PREFIX + Main.getInstance().getMessages().getString(pIdentifier))));
// 	}
// 
// }


// Path: src/main/java/de/simonsator/partyandfriends/admin/commands/PAFAdminCommand.java
import de.simonsator.partyandfriends.admin.commands.subcommands.DeletePlayerAdminSubCommand;
import de.simonsator.partyandfriends.api.AdminCommand;
import de.simonsator.partyandfriends.api.AdminSubCommand;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.chat.TextComponent;

package de.simonsator.partyandfriends.admin.commands;


public class PAFAdminCommand extends AdminCommand<AdminSubCommand> {
	private final String PREFIX = "§8[§5PAFAdmin§8]§r§7 ";
	private final TextComponent COMMAND_MESSAGE_BEGIN = new TextComponent(TextComponent.fromLegacyText(
			"§8§m--------------------§8[§5§lPAFADMIN§8]§m--------------------"));
	private final TextComponent COMMAND_MESSAGE_END = new TextComponent(TextComponent.fromLegacyText(
			"§8§m-----------------------------------------------------"));
	private final TextComponent SUB_COMMAND_DOES_NOT_EXIST = new TextComponent(TextComponent.fromLegacyText(PREFIX
			+ "§cThe command does not exist."));

	public PAFAdminCommand(String... aliases) {
		super(aliases);
		addSubcommand(new DeletePlayerAdminSubCommand(PREFIX));
	}

	@Override
	protected void executeCommand(CommandSender commandSender, String[] args) {
		if (args.length == 0) {
			commandSender.sendMessage(COMMAND_MESSAGE_BEGIN);
			for (AdminSubCommand command : getSubCommands())