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