Package net.blueva.arcade.api.config
Interface CoreConfigAPI
public interface CoreConfigAPI
API for accessing core plugin configuration files.
Provides access to settings.yml, messages.yml, sounds.yml, rewards.yml, etc.
Uses the platform configuration backend internally (no YAML dependency needed in modules).
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsFrom(String fileName, String path) Check if path exists in any core config file.booleangetBooleanFrom(String fileName, String path) Get boolean from any core config file.booleangetBooleanFrom(String fileName, String path, boolean def) Get boolean with default from any core config file.doublegetDoubleFrom(String fileName, String path) Get double from any core config file.doublegetDoubleFrom(String fileName, String path, double def) Get double with default from any core config file.intgetIntFrom(String fileName, String path) Get int from any core config file.intgetIntFrom(String fileName, String path, int def) Get int with default from any core config file.default StringgetLanguage(Object player, String key) Get message from messages/language file for a specific platform player.default StringGet player-specific message with placeholders replaced.getLanguage(String key) Get message from messages/language file.getLanguage(String key, Map<String, String> placeholders) Get message with placeholders replaced.getLanguageList(Object player, String key) Get player-specific message list.Get player-specific message list with placeholders.getLanguageList(String key) Get message list (for multi-line messages).getLanguageList(String key, Map<String, String> placeholders) Get message list with placeholders.intgetRewardsInt(String path) Get int from rewards.ymlintgetRewardsInt(String path, int def) Get int with default from rewards.ymlgetRewardsString(String path) Get value from rewards.ymlgetRewardsStringList(String path) Get list from rewards.ymlbooleangetSettingsBoolean(String path) Get boolean from settings.ymlbooleangetSettingsBoolean(String path, boolean def) Get boolean with default from settings.ymldoublegetSettingsDouble(String path) Get double from settings.ymldoublegetSettingsDouble(String path, double def) Get double with default from settings.ymlintgetSettingsInt(String path) Get int from settings.ymlintgetSettingsInt(String path, int def) Get int with default from settings.ymlgetSettingsString(String path) Get string from settings.ymlgetSettingsString(String path, String def) Get string with default from settings.ymlgetSettingsStringList(String path) Get string list from settings.ymlGet sound path from sounds.ymlgetSoundList(String key) Get sound list (for random sounds).getStringFrom(String fileName, String path) Get string from any core config file.getStringFrom(String fileName, String path, String def) Get string with default from any core config file.getStringListFrom(String fileName, String path) Get string list from any core config file.booleanhasLenguage(String key) Check if message key exists.booleanCheck if sound exists.voidReload a specific core configuration file.voidReload all core configuration files.booleanrewardsContains(String path) Check if path exists in rewards.ymlbooleansettingsContains(String path) Check if path exists in settings.yml
-
Method Details
-
getSettingsString
Get string from settings.yml -
getSettingsString
Get string with default from settings.yml -
getSettingsInt
Get int from settings.yml -
getSettingsInt
Get int with default from settings.yml -
getSettingsDouble
Get double from settings.yml -
getSettingsDouble
Get double with default from settings.yml -
getSettingsBoolean
Get boolean from settings.yml -
getSettingsBoolean
Get boolean with default from settings.yml -
getSettingsStringList
Get string list from settings.yml -
settingsContains
Check if path exists in settings.yml -
getLanguage
Get message from messages/language file.- Parameters:
key- Message key (e.g., "messages.game_started")- Returns:
- Message string
-
getLanguage
Get message from messages/language file for a specific platform player.The player parameter is intentionally typed as
Objectso the public API remains platform-neutral. Runtimes that support per-player languages should override this method and inspect their native player type.- Parameters:
player- platform player, ornullto use the server default localekey- Message key- Returns:
- Message string
- Since:
- 3.4
-
getLanguage
Get player-specific message with placeholders replaced.- Since:
- 3.4
-
getLanguage
Get message with placeholders replaced.- Parameters:
key- Message keyplaceholders- Map of placeholders to replace (e.g., {player} -> "Steve")- Returns:
- Formatted message
-
getLanguageList
Get message list (for multi-line messages).- Parameters:
key- List key (e.g., "scoreboard.lines")- Returns:
- List of message lines
-
getLanguageList
Get player-specific message list.- Since:
- 3.4
-
getLanguageList
Get player-specific message list with placeholders.- Since:
- 3.4
-
getLanguageList
Get message list with placeholders. -
hasLenguage
Check if message key exists. -
getSound
Get sound path from sounds.yml- Parameters:
key- Sound key (e.g., "sounds.game_start")- Returns:
- Sound configuration string
-
getSoundList
Get sound list (for random sounds). -
hasSound
Check if sound exists. -
getRewardsString
Get value from rewards.yml -
getRewardsInt
Get int from rewards.yml -
getRewardsInt
Get int with default from rewards.yml -
getRewardsStringList
Get list from rewards.yml -
rewardsContains
Check if path exists in rewards.yml -
getStringFrom
Get string from any core config file.- Parameters:
fileName- Config file name (e.g., "settings.yml")path- Config path- Returns:
- String value
-
getStringFrom
Get string with default from any core config file. -
getIntFrom
Get int from any core config file. -
getIntFrom
Get int with default from any core config file. -
getDoubleFrom
Get double from any core config file. -
getDoubleFrom
Get double with default from any core config file. -
getBooleanFrom
Get boolean from any core config file. -
getBooleanFrom
Get boolean with default from any core config file. -
getStringListFrom
Get string list from any core config file. -
containsFrom
Check if path exists in any core config file. -
reloadAll
void reloadAll()Reload all core configuration files. -
reload
Reload a specific core configuration file.
-