Package net.okocraft.box.api.bootstrap
Interface BootstrapContext
public interface BootstrapContext
An interface that represents the context during Box initialization.
This context is only available before BoxAPI is initialized.
-
Method Summary
Modifier and TypeMethodDescription@NotNull BootstrapContextaddFeature(@NotNull FeatureFactory factory) Adds aFeatureFactoryto create and registerBoxFeature.static @NotNull BootstrapContextget()Gets theBootstrapContext.@NotNull PathGets the data directory of Box.@NotNull DefaultMessageCollectorGets theDefaultMessageCollector.@NotNull EventCaller<BoxEvent> Gets theEventCaller.@NotNull ListenerSubscriber<net.kyori.adventure.key.Key, BoxEvent, Priority> Gets theListenerSubscriber.@NotNull StringGets the version of Box.
-
Method Details
-
get
Gets theBootstrapContext.- Returns:
- the
BootstrapContext - Throws:
IllegalStateException- if Box is not being initialized
-
getDataDirectory
Gets the data directory of Box.- Returns:
- the data directory of Box
-
getVersion
Gets the version of Box.- Returns:
- the version of Box
-
getEventCaller
Gets theEventCaller.- Returns:
- the
EventCaller
-
getListenerSubscriber
@NotNull @NotNull ListenerSubscriber<net.kyori.adventure.key.Key,BoxEvent, getListenerSubscriber()Priority> Gets theListenerSubscriber.- Returns:
- the
ListenerSubscriber
-
getDefaultMessageCollector
Gets theDefaultMessageCollector.- Returns:
- the
DefaultMessageCollector
-
addFeature
@Contract("_ -> this") @NotNull @NotNull BootstrapContext addFeature(@NotNull @NotNull FeatureFactory factory) Adds aFeatureFactoryto create and registerBoxFeature.- Parameters:
factory- aFeatureFactoryto create and registerBoxFeature- Returns:
- this
BootstrapContext
-