Package net.okocraft.box.api
Interface BoxAPI
public interface BoxAPI
An API of Box.
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull BoxAPIapi()Gets an instance ofBoxAPI.booleanChecks if the specifiedPlayercan use Box.@NotNull BoxAdminCommandGets theBoxAdminCommand.@NotNull BoxCommandGets theBoxCommand.@NotNull BoxPlayerMapGets theBoxPlayerMap.@NotNull CustomDataManagerGets theCustomDataManager.@NotNull EventCallerProviderGets theEventCallerProvider.@NotNull FeatureProviderGets theFeatureProvider.@NotNull ItemManagerGets theItemManager.@NotNull ListenerSubscriber<net.kyori.adventure.key.Key, BoxEvent, Priority> Gets theListenerSubscriber.@NotNull MessageProviderGets theMessageProvider.@NotNull PathGets the path of the plugin directory.@NotNull BoxSchedulerGets theBoxScheduler.@NotNull StockManagerGets theStockManager.@NotNull UserManagerGets theUserManager.booleanisDisabledWorld(@NotNull String worldName) Checks if Box is not available in the specified world name.booleanisDisabledWorld(@NotNull World world) Checks if Box is not available in the specified world.static booleanisLoaded()Checks ifBoxAPIis available.voidreload(@NotNull CommandSender sender) Reloads box and registeredBoxFeatures.
-
Method Details
-
api
Gets an instance ofBoxAPI.- Returns:
- an instance of
BoxAPI - Throws:
IllegalStateException- ifBoxAPIis not loaded
-
isLoaded
static boolean isLoaded()Checks ifBoxAPIis available.- Returns:
trueifBoxAPIis loaded, otherwisefalse
-
getPluginDirectory
Gets the path of the plugin directory.- Returns:
- the path of the plugin directory
-
getMessageProvider
Gets theMessageProvider.- Returns:
- the
MessageProvider
-
getUserManager
Gets theUserManager.- Returns:
- the
UserManager
-
getItemManager
Gets theItemManager.- Returns:
- the
ItemManager
-
getStockManager
Gets theStockManager.- Returns:
- the
StockManager
-
getBoxPlayerMap
Gets theBoxPlayerMap.- Returns:
- the
BoxPlayerMap
-
getEventCallers
Gets theEventCallerProvider.- Returns:
- the
EventCallerProvider
-
getListenerSubscriber
@NotNull @NotNull ListenerSubscriber<net.kyori.adventure.key.Key,BoxEvent, getListenerSubscriber()Priority> Gets theListenerSubscriber.- Returns:
- the
ListenerSubscriber
-
getCustomDataManager
Gets theCustomDataManager.- Returns:
- the
CustomDataManager
-
getFeatureProvider
Gets theFeatureProvider.- Returns:
- the
FeatureProvider
-
getScheduler
Gets theBoxScheduler.- Returns:
- the
BoxScheduler
-
getBoxCommand
Gets theBoxCommand.- Returns:
- the
BoxCommand
-
getBoxAdminCommand
Gets theBoxAdminCommand.- Returns:
- the
BoxAdminCommand
-
reload
Reloads box and registeredBoxFeatures.This method reloads some settings of Box (such as language and disabled world) and the
BoxFeaturein whichReloadableis implemented.- Parameters:
sender- the sender who executed reload
-
canUseBox
Checks if the specifiedPlayercan use Box. -
isDisabledWorld
Checks if Box is not available in the specified world.- Parameters:
world- the world to check- Returns:
- if Box is disabled in the specified world, returns
true, otherwisefalse
-
isDisabledWorld
Checks if Box is not available in the specified world name.- Parameters:
worldName- the world name to check- Returns:
- if Box is disabled in the specified world, returns
true, otherwisefalse
-