	public void processCommandPlayer(EntityPlayer sender, String[] args)
	{
		if (args.length == 0)
			throw new WrongUsageException("command.auth.usage");
		boolean hasAdmin = PermissionsAPI.checkPermAllowed(new PermQueryPlayer(sender, getCommandPerm() + ".admin"));
		if (args.length == 1)
		{
			if (args[0].equalsIgnoreCase("help"))
			{
				OutputHandler.chatConfirmation(sender, " - /auth register <password>");
				OutputHandler.chatConfirmation(sender, " - /auth login <player>");
				OutputHandler.chatConfirmation(sender, " - /auth changepass <oldpass> <newpass>  - changes your password");
				if (!hasAdmin)
					return;
				OutputHandler.chatConfirmation(sender, " - /auth kick <player>  - forces the player to login again");
				OutputHandler.chatConfirmation(sender, " - /auth setpass <player> <password>  - sets the players password");
				OutputHandler.chatConfirmation(sender, " - /auth unregister <player>  - forces the player to register again");
				return;
			}
			else
				throw new WrongUsageException("command.auth.usage");
		}
		if (args.length == 2)
		{
			if (args[0].equalsIgnoreCase("login"))
			{
				PlayerPassData data = PlayerPassData.getData(sender.username);
				if (data == null)
				{
					OutputHandler.chatError(sender, Localization.format("message.auth.error.notregisterred", sender.username));
					return;
				}
				String pass = ModuleAuth.encrypt(args[1]);
				if (data.password.equals(pass))
				{
					ModuleAuth.unLogged.remove(sender.username);
					OutputHandler.chatConfirmation(sender, Localization.get("command.auth.login.success"));
				}
				else
				{
					OutputHandler.chatError(sender, Localization.get("command.auth.login.fail"));
				}
				return;
			}
			else if (args[0].equalsIgnoreCase("register"))
			{
				if (PlayerPassData.getData(sender.username) != null)
				{
					OutputHandler.chatError(sender, Localization.format("message.auth.error.yesregisterred", sender.username));
					return;
				}
				if (ModuleAuth.isEnabled() && !ModuleAuth.allowOfflineReg)
				{
					OutputHandler.chatError(sender, Localization.format("message.auth.error.disabledreg"));
					return;
				}
				String pass = ModuleAuth.encrypt(args[1]);
				PlayerPassData.registerData(sender.username, pass);
				ModuleAuth.unRegistered.remove(sender.username);
				OutputHandler.chatConfirmation(sender, Localization.get("command.auth.register.success"));
				return;
			}
			if (ModuleAuth.unLogged.contains(sender.username))
			{
				OutputHandler.chatError(sender, Localization.get("message.auth.needlogin"));
				return;
			}
			else if (ModuleAuth.unRegistered.contains(sender.username))
			{
				OutputHandler.chatError(sender, Localization.get("message.auth.needregister"));
				return;
			}
			String name = args[1];
			boolean isLogged = true;
			EntityPlayerMP player = FunctionHelper.getPlayerForName(sender, name);
			if (player == null)
			{
				OutputHandler.chatWarning(sender, "A player of that name is not on the server. Doing the action anyways.");
				isLogged = false;
			}
			if (args[0].equalsIgnoreCase("kick"))
			{
				if (!hasAdmin)
					throw new PermissionDeniedException();
				else if (!isLogged)
					throw new PlayerNotFoundException();
				else
				{
					ModuleAuth.unLogged.add(name);
					OutputHandler.chatConfirmation(sender, Localization.format("command.auth.kick.user", name));
					OutputHandler.chatWarning(player, Localization.get("command.auth.kick.target"));
					return;
				}
			}
			else if (args[0].equalsIgnoreCase("setPass"))
			{
				if (!hasAdmin)
					throw new PermissionDeniedException();
				throw new WrongUsageException("command.auth.usage.setpass");
			}
			else if (args[0].equalsIgnoreCase("unregister"))
			{
				if (!hasAdmin)
					throw new PermissionDeniedException();
				if (PlayerPassData.getData(name) == null)
					throw new WrongUsageException("message.auth.error.notregisterred", name);
				PlayerPassData.deleteData(name);
				OutputHandler.chatConfirmation(sender, Localization.format("command.auth.unregister", name));
				return;
			}
			else
				throw new WrongUsageException("command.auth.usage");
		}
		else if (args.length == 3)
		{
			if (ModuleAuth.unLogged.contains(sender.username))
			{
				OutputHandler.chatError(sender, Localization.get("message.auth.needlogin"));
				return;
			}
			else if (ModuleAuth.unRegistered.contains(sender.username))
			{
				OutputHandler.chatError(sender, Localization.get("message.auth.needregister"));
				return;
			}
			if (args[0].equalsIgnoreCase("changepass"))
			{
				PlayerPassData data = PlayerPassData.getData(sender.username);
				String oldpass = ModuleAuth.encrypt(args[1]);
				String newPass = ModuleAuth.encrypt(args[2]);
				if (args[1].equals(args[2]))
				{
					OutputHandler.chatConfirmation(sender, Localization.get("command.auth.change.same"));
					return;
				}
				if (!data.password.equals(oldpass))
				{
					OutputHandler.chatConfirmation(sender, Localization.get("command.auth.change.wrongpass"));
					return;
				}
				data.password = newPass;
				data.save();
				OutputHandler.chatConfirmation(sender, Localization.get("command.auth.change.success"));
				return;
			}
			String name = args[1];
			EntityPlayerMP player = FunctionHelper.getPlayerForName(sender, name);
			if (player == null)
			{
				OutputHandler.chatWarning(sender, "A player of that name is not on the server. Doing the action anyways.");
			}
			if (args[0].equalsIgnoreCase("setPass"))
			{
				if (!hasAdmin)
					throw new PermissionDeniedException();
				PlayerPassData data = PlayerPassData.getData(name);
				String encrypted = ModuleAuth.encrypt(args[2]);
				if (data == null)
				{
					PlayerPassData.registerData(name, encrypted);
				}
				else
				{
					data.password = encrypted;
					data.save();
				}
				OutputHandler.chatConfirmation(sender, Localization.format("command.auth.setPass", name));
			}
		}
	}

	public void processCommandPlayer(EntityPlayer sender, String[] args)
	{
		if (args.length == 0)
			throw new WrongUsageException("command.auth.usage");
		boolean hasAdmin = PermissionsAPI.checkPermAllowed(new PermQueryPlayer(sender, getCommandPerm() + ".admin"));
		if (args.length == 1)
		{
			if (args[0].equalsIgnoreCase("help"))
			{
				OutputHandler.chatConfirmation(sender, " - /auth register <password>");
				OutputHandler.chatConfirmation(sender, " - /auth login <password>");
				OutputHandler.chatConfirmation(sender, " - /auth changepass <oldpass> <newpass>  - changes your password");
				if (!hasAdmin)
					return;
				OutputHandler.chatConfirmation(sender, " - /auth kick <player>  - forces the player to login again");
				OutputHandler.chatConfirmation(sender, " - /auth setpass <player> <password>  - sets the players password");
				OutputHandler.chatConfirmation(sender, " - /auth unregister <player>  - forces the player to register again");
				return;
			}
			else
				throw new WrongUsageException("command.auth.usage");
		}
		if (args.length == 2)
		{
			if (args[0].equalsIgnoreCase("login"))
			{
				PlayerPassData data = PlayerPassData.getData(sender.username);
				if (data == null)
				{
					OutputHandler.chatError(sender, Localization.format("message.auth.error.notregisterred", sender.username));
					return;
				}
				String pass = ModuleAuth.encrypt(args[1]);
				if (data.password.equals(pass))
				{
					ModuleAuth.unLogged.remove(sender.username);
					OutputHandler.chatConfirmation(sender, Localization.get("command.auth.login.success"));
				}
				else
				{
					OutputHandler.chatError(sender, Localization.get("command.auth.login.fail"));
				}
				return;
			}
			else if (args[0].equalsIgnoreCase("register"))
			{
				if (PlayerPassData.getData(sender.username) != null)
				{
					OutputHandler.chatError(sender, Localization.format("message.auth.error.yesregisterred", sender.username));
					return;
				}
				if (ModuleAuth.isEnabled() && !ModuleAuth.allowOfflineReg)
				{
					OutputHandler.chatError(sender, Localization.format("message.auth.error.disabledreg"));
					return;
				}
				String pass = ModuleAuth.encrypt(args[1]);
				PlayerPassData.registerData(sender.username, pass);
				ModuleAuth.unRegistered.remove(sender.username);
				OutputHandler.chatConfirmation(sender, Localization.get("command.auth.register.success"));
				return;
			}
			if (ModuleAuth.unLogged.contains(sender.username))
			{
				OutputHandler.chatError(sender, Localization.get("message.auth.needlogin"));
				return;
			}
			else if (ModuleAuth.unRegistered.contains(sender.username))
			{
				OutputHandler.chatError(sender, Localization.get("message.auth.needregister"));
				return;
			}
			String name = args[1];
			boolean isLogged = true;
			EntityPlayerMP player = FunctionHelper.getPlayerForName(sender, name);
			if (player == null)
			{
				OutputHandler.chatWarning(sender, "A player of that name is not on the server. Doing the action anyways.");
				isLogged = false;
			}
			if (args[0].equalsIgnoreCase("kick"))
			{
				if (!hasAdmin)
					throw new PermissionDeniedException();
				else if (!isLogged)
					throw new PlayerNotFoundException();
				else
				{
					ModuleAuth.unLogged.add(name);
					OutputHandler.chatConfirmation(sender, Localization.format("command.auth.kick.user", name));
					OutputHandler.chatWarning(player, Localization.get("command.auth.kick.target"));
					return;
				}
			}
			else if (args[0].equalsIgnoreCase("setPass"))
			{
				if (!hasAdmin)
					throw new PermissionDeniedException();
				throw new WrongUsageException("command.auth.usage.setpass");
			}
			else if (args[0].equalsIgnoreCase("unregister"))
			{
				if (!hasAdmin)
					throw new PermissionDeniedException();
				if (PlayerPassData.getData(name) == null)
					throw new WrongUsageException("message.auth.error.notregisterred", name);
				PlayerPassData.deleteData(name);
				OutputHandler.chatConfirmation(sender, Localization.format("command.auth.unregister", name));
				return;
			}
			else
				throw new WrongUsageException("command.auth.usage");
		}
		else if (args.length == 3)
		{
			if (ModuleAuth.unLogged.contains(sender.username))
			{
				OutputHandler.chatError(sender, Localization.get("message.auth.needlogin"));
				return;
			}
			else if (ModuleAuth.unRegistered.contains(sender.username))
			{
				OutputHandler.chatError(sender, Localization.get("message.auth.needregister"));
				return;
			}
			if (args[0].equalsIgnoreCase("changepass"))
			{
				PlayerPassData data = PlayerPassData.getData(sender.username);
				String oldpass = ModuleAuth.encrypt(args[1]);
				String newPass = ModuleAuth.encrypt(args[2]);
				if (args[1].equals(args[2]))
				{
					OutputHandler.chatConfirmation(sender, Localization.get("command.auth.change.same"));
					return;
				}
				if (!data.password.equals(oldpass))
				{
					OutputHandler.chatConfirmation(sender, Localization.get("command.auth.change.wrongpass"));
					return;
				}
				data.password = newPass;
				data.save();
				OutputHandler.chatConfirmation(sender, Localization.get("command.auth.change.success"));
				return;
			}
			String name = args[1];
			EntityPlayerMP player = FunctionHelper.getPlayerForName(sender, name);
			if (player == null)
			{
				OutputHandler.chatWarning(sender, "A player of that name is not on the server. Doing the action anyways.");
			}
			if (args[0].equalsIgnoreCase("setPass"))
			{
				if (!hasAdmin)
					throw new PermissionDeniedException();
				PlayerPassData data = PlayerPassData.getData(name);
				String encrypted = ModuleAuth.encrypt(args[2]);
				if (data == null)
				{
					PlayerPassData.registerData(name, encrypted);
				}
				else
				{
					data.password = encrypted;
					data.save();
				}
				OutputHandler.chatConfirmation(sender, Localization.format("command.auth.setPass", name));
			}
		}
	}
