public static void save(User user, Sender sender, LuckPermsPlugin plugin) {
        try {
            plugin.getStorage().saveUser(user).get();
        } catch (Exception e) {
            plugin.getLogger().warn("Error whilst saving user", e);
            Message.USER_SAVE_ERROR.send(sender, user);
            return;
        }

        Optional<InternalMessagingService> messagingService = plugin.getMessagingService();
        if (messagingService.isPresent() && plugin.getConfiguration().get(ConfigKeys.AUTO_PUSH_UPDATES)) {
            messagingService.get().pushUserUpdate(user);
        }
    }
Utility methods for saving users, groups and tracks.
common/src/main/java/me/lucko/luckperms/common/command/utils/StorageAssistant.java