Interface StarConfig
public interface StarConfig
Represents the main StarCosmetics Configuration.
-
Method Summary
Modifier and TypeMethodDescription@NotNull StringFetches a String from the Language File.default StringFetches a String from the Language File.longHow long, in ticks, a block cosmetic should last for.static @NotNull StarConfigFetches the StarConfig instance.static @NotNull FileConfigurationFetches the StarCosmetics Configuration.static @NotNull FileFetches the StarCosmetics Configuration File.static @NotNull FileFetches the plugin's data folder.@NotNull Set<CosmeticLocation<?>>Fetches a list of all disabled cosmetics.longHow long, in ticks, an entity cosmetic should last for.longHow long, in ticks, an item cosmetic should last for.@NotNull StringFetches the current Language.default @NotNull LocaleFetches the locale based ongetLanguage().static @NotNull LoggerFetches the StarCosmetics Logger.static @NotNull FileFetches the StarCosmetics Player Data Directory.static @NotNull PluginFetches the plugin.static @NotNull CosmeticRegistryFetches the StarCosmetics Cosmetic Registry.getStructureReader(@NotNull File file) Fetches the current implementation of the StructureReader.getStructureReader(@NotNull InputStream stream) Fetches the current implementation of the StructureReader.getStructureReader(@NotNull Reader reader) Fetches the current implementation of the StructureReader.default StringgetWithArgs(String key, Object... args) Fetches a String from the Language File.default StringgetWithArgs(String key, String def, Object... args) Fetches a String from the Language File.booleanWhether pets can play their ambient sound.static @NotNull FileConfigurationLoads the StarCosmetics Configuration.static voidPrints a Throwable in the StarCosmetics Logger.voidsetAmbientPetSoundEnabled(boolean enabled) Sets whether pets can play their ambient sound.voidsetBlockDisappearTime(long time) Sets how long, in ticks, a block cosmetic should last for.voidsetEntityDisappearTime(long time) Sets how long, in ticks, an entity cosmetic should last for.voidsetItemDisappearTime(long time) Sets how long, in ticks, an item cosmetic should last for.static voidUpdates the Plugin's Cache, removing any old data.voidUpdates the plugin's cached data, removing any old states.
-
Method Details
-
getPlugin
Fetches the plugin.- Returns:
- The plugin.
-
updateCache
static void updateCache()Updates the Plugin's Cache, removing any old data.- See Also:
-
getConfig
Fetches the StarConfig instance.- Returns:
- StarConfig Instance
-
print
Prints a Throwable in the StarCosmetics Logger.- Parameters:
t- Throwable to print.
-
getConfiguration
Fetches the StarCosmetics Configuration.- Returns:
- StarCosmetics Configuration
-
getDataFolder
Fetches the plugin's data folder.- Returns:
- Plugin's data folder.
-
getLogger
Fetches the StarCosmetics Logger.- Returns:
- StarCosmetics Logger
-
getConfigurationFile
Fetches the StarCosmetics Configuration File.- Returns:
- StarCosmetics Configuration File
-
loadConfig
Loads the StarCosmetics Configuration.- Returns:
- StarCosmetics Configuration
-
getRegistry
Fetches the StarCosmetics Cosmetic Registry.- Returns:
- StarCosmetics Cosmetic Registry
-
getPlayerDirectory
Fetches the StarCosmetics Player Data Directory.- Returns:
- StarCosmetics Player Data Directory
-
getLanguage
Fetches the current Language.- Returns:
- Current Language
-
getLocale
Fetches the locale based ongetLanguage().- Returns:
- Language Locale
-
get
Fetches a String from the Language File.- Parameters:
key- Key to fetch.- Returns:
- String from the Language File according to the current Language
-
get
Fetches a String from the Language File.- Parameters:
key- Key to fetch.def- Default String to return if the key is not found.- Returns:
- String from the Language File according to the current Language
-
getWithArgs
Fetches a String from the Language File.- Parameters:
key- Key to fetch.args- Arguments to replace in the String.- Returns:
- String from the Language File according to the current Language
-
getWithArgs
Fetches a String from the Language File.- Parameters:
key- Key to fetch.def- Default String to return if the key is not found.args- Arguments to replace in the String.- Returns:
- String from the Language File according to the current Language
-
updatePluginCache
void updatePluginCache()Updates the plugin's cached data, removing any old states. -
getEntityDisappearTime
long getEntityDisappearTime()How long, in ticks, an entity cosmetic should last for.- Returns:
- Entity Cosmetic Duration
-
setEntityDisappearTime
Sets how long, in ticks, an entity cosmetic should last for.- Parameters:
time- Entity Cosmetic Duration- Throws:
IllegalArgumentException- if time is not positive
-
getItemDisappearTime
long getItemDisappearTime()How long, in ticks, an item cosmetic should last for.- Returns:
- Item Cosmetic Duration
-
setItemDisappearTime
Sets how long, in ticks, an item cosmetic should last for.- Parameters:
time- Item Cosmetic Duration- Throws:
IllegalArgumentException- if time is not positive
-
getBlockDisappearTime
long getBlockDisappearTime()How long, in ticks, a block cosmetic should last for.- Returns:
- Item Cosmetic Duration
-
setBlockDisappearTime
Sets how long, in ticks, a block cosmetic should last for.- Parameters:
time- Item Cosmetic Duration- Throws:
IllegalArgumentException- if time is not positive
-
getStructureReader
Fetches the current implementation of the StructureReader.- Parameters:
file- File to Read- Returns:
- StructureReader
-
getStructureReader
Fetches the current implementation of the StructureReader.- Parameters:
stream- InputStream to Read- Returns:
- StructureReader
-
getStructureReader
Fetches the current implementation of the StructureReader.- Parameters:
reader- Reader to Read- Returns:
- StructureReader
-
getDisabledCosmetics
Fetches a list of all disabled cosmetics.- Returns:
- Disabled Cosmetics
-
isAmbientPetSoundEnabled
boolean isAmbientPetSoundEnabled()Whether pets can play their ambient sound.- Returns:
- true if enabled, else false
-
setAmbientPetSoundEnabled
void setAmbientPetSoundEnabled(boolean enabled) Sets whether pets can play their ambient sound.- Parameters:
enabled- true if enabled, else false
-