Package net.blueva.arcade.api
Class ModuleAPI
java.lang.Object
net.blueva.arcade.api.ModuleAPI
Static API accessor for modules.
Provides access to global APIs during onLoad().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInterface implemented by the core plugin. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AchievementsAPIGet achievements API for registering and opening achievements.static CoreConfigAPIGet CoreConfigAPI for accessing core plugin configurations.static HytaleMenuAPIGet the experimental Hytale Menu API for HyUI-backed custom pages.static ItemAPI<?, ?, ?> Get ItemAPI for item formatting and lobby item registration.static LanguageAPI<?> Get LanguageAPI for locale-aware module translations.static MenuAPIGet MenuAPI for opening custom menus in Java and Bedrock.static MessageAPI<?> Get MessageAPI for sending formatted messages.static ModuleConfigAPIgetModuleConfig(String moduleId) Get ModuleConfigAPI for a specific module.static ModuleInfogetModuleInfo(String moduleId) Get ModuleInfo for accessing module metadata from module.yml.static PersistentPlayerDataAPI<?> Get PersistentPlayerDataAPI for module-scoped persistent player data.static PlayerUtil<?> Get PlayerUtil for player state checks outside a GameContext.static GameSetupAPIGet GameSetupAPI for registering game setup commands.static StatsAPIGet stats API for registering and updating module stats.static StoreAPIGet StoreAPI for registering store categories and items.static VisualEffectsAPIGet visual effects API for triggering store-based kill/death effects.static VoteMenuAPIGet VoteMenuAPI for registering games in vote menu.static voidsetProvider(ModuleAPI.ModuleAPIProvider provider) Set the API provider (called by core plugin, DO NOT USE in modules).
-
Constructor Details
-
ModuleAPI
public ModuleAPI()
-
-
Method Details
-
setProvider
Set the API provider (called by core plugin, DO NOT USE in modules). -
getModuleConfig
Get ModuleConfigAPI for a specific module. Returns null if module doesn't have config files.- Parameters:
moduleId- Module ID (e.g., "race")- Returns:
- ModuleConfigAPI or null
-
getVoteMenuAPI
Get VoteMenuAPI for registering games in vote menu.- Returns:
- VoteMenuAPI instance
-
getMenuAPI
Get MenuAPI for opening custom menus in Java and Bedrock.- Returns:
- MenuAPI instance
-
getHytaleMenuAPI
Get the experimental Hytale Menu API for HyUI-backed custom pages.This accessor may return
nullon non-Hytale platforms.- Returns:
- HytaleMenuAPI instance or
null - Since:
- 3.2
-
getStoreAPI
Get StoreAPI for registering store categories and items.- Returns:
- StoreAPI instance
-
getItemAPI
Get ItemAPI for item formatting and lobby item registration.- Returns:
- ItemAPI instance
-
getMessagesAPI
Get MessageAPI for sending formatted messages.- Returns:
- MessageAPI instance
-
getCoreConfig
Get CoreConfigAPI for accessing core plugin configurations. Provides access to settings.yml, messages.yml, sounds.yml, rewards.yml- Returns:
- CoreConfigAPI instance
-
getModuleInfo
Get ModuleInfo for accessing module metadata from module.yml. This provides a clean way to access module information without having to duplicate it in code.- Parameters:
moduleId- Module ID (e.g., "race")- Returns:
- ModuleInfo with metadata from module.yml
-
getSetupAPI
Get GameSetupAPI for registering game setup commands. Allows modules to register their own /baa gamehandlers. - Returns:
- GameSetupAPI instance
-
getStatsAPI
Get stats API for registering and updating module stats.- Returns:
- StatsAPI instance
-
getAchievementsAPI
Get achievements API for registering and opening achievements.- Returns:
- AchievementsAPI instance
-
getVisualEffectsAPI
Get visual effects API for triggering store-based kill/death effects.- Returns:
- VisualEffectsAPI instance
-
getPlayerUtil
Get PlayerUtil for player state checks outside a GameContext.- Returns:
- PlayerUtil instance
-
getPersistentPlayerDataAPI
Get PersistentPlayerDataAPI for module-scoped persistent player data.- Returns:
- PersistentPlayerDataAPI instance, or
nullif unavailable - Since:
- 3.4
-
getLanguageAPI
Get LanguageAPI for locale-aware module translations.- Returns:
- LanguageAPI instance, or
nullif unavailable - Since:
- 3.4
-