class AsynchronousUnregister implements AsynchronousProcess {

    public void unregister(Player player, String password) {
        final String name = player.getName();
        final PlayerAuth cachedAuth = playerCache.getAuth(name);
        if (passwordSecurity.comparePassword(password, cachedAuth.getPassword(), name)) {
            if (dataSource.removeAuth(name)) {
                performPostUnregisterActions(name, player);
                ConsoleLogger.info(name + " unregistered himself");
                bukkitService.createAndCallEvent(isAsync -> new UnregisterByPlayerEvent(player, isAsync));
            } else {
                service.send(player, MessageKey.ERROR);
            }
        } else {
            service.send(player, MessageKey.WRONG_PASSWORD);
        }
    }

      AsynchronousUnregister();

}