public Locale getLocale(ServerPlayer player) {
        if (this.language == null || !this.language.equals(player.getLanguage())) {
            this.language = player.getLanguage();
            this.locale = TranslationManager.parseLocale(this.language);
        }

        return this.locale;
    }
Gets a {@link UserCapability} for a given {@link ServerPlayer}.

@param player the player
@return the capability, or null
forge/src/main/java/me/lucko/luckperms/forge/capabilities/UserCapabilityImpl.java