All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.aurelium.auraskills.api.source.SourceManager Maven / Gradle / Ivy

There is a newer version: 2.2.6
Show newest version
package dev.aurelium.auraskills.api.source;

import dev.aurelium.auraskills.api.config.ConfigNode;
import org.jetbrains.annotations.ApiStatus.Internal;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;
import java.util.Locale;

public interface SourceManager {

    /**
     * Gets a list of {@link SkillSource} of a specific type. Each list element contains the XpSource
     * instance and the skill it belongs to.
     *
     * @param typeClass the class of the {@link XpSource} type
     * @return a list of sources
     * @param  an instance of XpSource
     */
    @NotNull
     List> getSourcesOfType(Class typeClass);

    /**
     * Gets the first loaded source found of a given source type. Used for sources where only
     * one instance is expected due to having no variants.
     *
     * @param typeClass the class of the {@link XpSource} type
     * @return the {@link SkillSource}
     * @param  an instance of XpSource
     */
    @Nullable
     SkillSource getSingleSourceOfType(Class typeClass);

    @Nullable
    String getUnitName(XpSource source, Locale locale);

    @Internal
    SourceIncome loadSourceIncome(ConfigNode source);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy