Package net.okocraft.box.api
Interface BoxAPI
public interface BoxAPI
An API of Box.
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull BoxAPI
api()
Gets an instance ofBoxAPI
.boolean
canUseBox
(@NotNull org.bukkit.entity.Player player) Checks if the specifiedPlayer
can use Box.@NotNull BoxAdminCommand
Gets theBoxAdminCommand
.@NotNull BoxCommand
Gets theBoxCommand
.@NotNull BoxPlayerMap
Gets theBoxPlayerMap
.@NotNull CustomDataManager
Gets theCustomDataManager
.@NotNull EventCallerProvider
Gets theEventCallerProvider
.@NotNull FeatureProvider
Gets theFeatureProvider
.@NotNull ItemManager
Gets theItemManager
.@NotNull ListenerSubscriber
<net.kyori.adventure.key.Key, BoxEvent, Priority> Gets theListenerSubscriber
.@NotNull MessageProvider
Gets theMessageProvider
.@NotNull Path
Gets the path of the plugin directory.@NotNull BoxScheduler
Gets theBoxScheduler
.@NotNull StockManager
Gets theStockManager
.@NotNull UserManager
Gets theUserManager
.boolean
isDisabledWorld
(@NotNull String worldName) Checks if Box is not available in the specified world name.boolean
isDisabledWorld
(@NotNull org.bukkit.World world) Checks if Box is not available in the specified world.static boolean
isLoaded()
Checks ifBoxAPI
is available.void
reload
(@NotNull org.bukkit.command.CommandSender sender) Reloads box and registeredBoxFeature
s.
-
Method Details
-
api
Gets an instance ofBoxAPI
.- Returns:
- an instance of
BoxAPI
- Throws:
IllegalStateException
- ifBoxAPI
is not loaded
-
isLoaded
static boolean isLoaded()Checks ifBoxAPI
is available.- Returns:
true
ifBoxAPI
is 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
void reload(@NotNull @NotNull org.bukkit.command.CommandSender sender) Reloads box and registeredBoxFeature
s.This method reloads some settings of Box (such as language and disabled world) and the
BoxFeature
in whichReloadable
is implemented.- Parameters:
sender
- the sender who executed reload
-
canUseBox
boolean canUseBox(@NotNull @NotNull org.bukkit.entity.Player player) Checks if the specifiedPlayer
can use Box.- Parameters:
player
- thePlayer
to check- Returns:
true
if thePlayer
can use Box, otherwisefalse
-
isDisabledWorld
boolean isDisabledWorld(@NotNull @NotNull org.bukkit.World world) 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
-