@Override
    public boolean testUsernameValidity(String username) {
        // if the username doesn't even pass the lenient test, don't bother going any further
        // it's either empty, or too long to fit in the sql column
        if (!DataConstraints.PLAYER_USERNAME_TEST_LENIENT.test(username)) {
            return false;
        }

        // if invalid usernames are allowed in the config, set valid to true, otherwise, use the more strict test
        boolean valid = getConfiguration().get(ConfigKeys.ALLOW_INVALID_USERNAMES) || DataConstraints.PLAYER_USERNAME_TEST.test(username);

        // fire the event & return
        return getEventDispatcher().dispatchUsernameValidityCheck(username, valid);
    }
Performs the initial actions to load the plugin
common/src/main/java/me/lucko/luckperms/common/plugin/AbstractLuckPermsPlugin.java