Package net.okocraft.box.api.feature
Interface FeatureProvider
public interface FeatureProvider
An interface to provide
BoxFeatures.-
Method Summary
Modifier and TypeMethodDescription<F extends BoxFeature>
@NotNull Optional<F> getFeature(@NotNull Class<? extends F> clazz) Gets theBoxFeatureinstance of the specified class.@NotNull @Unmodifiable Collection<? extends BoxFeature> Gets all registeredBoxFeatures.
-
Method Details
-
getFeature
@NotNull <F extends BoxFeature> @NotNull Optional<F> getFeature(@NotNull @NotNull Class<? extends F> clazz) Gets theBoxFeatureinstance of the specified class.- Type Parameters:
F- theBoxFeaturetype- Parameters:
clazz- the class to get- Returns:
- if the
BoxFeatureis registered, returns its instance, otherwiseOptional.empty()
-
getFeatures
Gets all registeredBoxFeatures.- Returns:
- all registered
BoxFeatures
-