Class Settings
java.lang.Object
ua.mcchickenstudio.opencreative.settings.Settings
Settings
This class represents Settings, that stores values which are used in plugin.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddMessageIgnoringReset(@NotNull String path) booleanaddRecommendedWorld(int worldID) @NotNull CodingSettingsReturns settings of coding mode.@NotNull CommandsReturns custom commands executions.@NotNull DownloaderSettingsReturns settings of world downloader.@NotNull EconomySettingsReturns settings of economy.@NotNull GroupsReturns instance of groups, that stores all groups and contains methods to get data from them.@NotNull ItemFixerSettingsReturns settings of item fixer.Returns a map of item groups and custom item groups from config.@NotNull LobbySettingsReturns settings of lobby world.Returns set of messages paths, that will be recovered on resetting locale from old localization file to new.@NotNull RequirementsReturns settings of requirements.Returns a map of sounds and custom sounds from config.@NotNull WebSettingsReturns settings of web services.@NotNull WorldFixerSettingsReturns settings of world fixer.booleanbooleanisDebug()booleanChecks whether plugin was launched for first time, without /plugins/OpenCreative folder.booleanChecks whether it's maintenance mode or not.booleanvoidload(boolean reload) Loads settings values from configuration file.booleanremoveMessageIgnoringReset(@NotNull String path) booleanremoveRecommendedWorld(int worldID) voidresetItemsGroup(ItemsGroup group) voidsetCreativeChatEnabled(boolean creativeChatEnabled) voidsetCustomItem(ItemsGroup group, int slot, @NotNull org.bukkit.inventory.ItemStack item) voidsetCustomItem(ItemsGroup group, int slot, @NotNull Items item) voidsetDebug(boolean debug) voidsetMaintenance(boolean maintenance) Sets maintenance mode without command sender.voidsetMaintenance(boolean maintenance, @Nullable org.bukkit.command.CommandSender sender) Sets maintenance mode.booleansetSoundsTheme(String theme) booleanChecks whether player's messages should be hidden from chat, when they're changing world's or module's name or description.booleanChecks whether flat world generator should generate a world starting with Y: 0, instead of Y: -64.booleanChecks whether world chat and messages starting with ! will be handled by OpenCreative+.booleanChecks whether critical errors will be shown in console.booleanChecks whether grief stats will be shown in console.booleanChecks whether not translated messages will be shown in console.booleanChecks whether sign edits will be shown in console.booleanChecks whether warnings will be shown in console.booleanChecks whether player should see "No players around message" message, when there is no other players in their world.
-
Constructor Details
-
Settings
public Settings()
-
-
Method Details
-
load
public void load(boolean reload) Loads settings values from configuration file. -
setSoundsTheme
-
addRecommendedWorld
public boolean addRecommendedWorld(int worldID) -
removeRecommendedWorld
public boolean removeRecommendedWorld(int worldID) -
addMessageIgnoringReset
-
removeMessageIgnoringReset
-
setCustomItem
public void setCustomItem(ItemsGroup group, int slot, @NotNull @NotNull org.bukkit.inventory.ItemStack item) -
setCustomItem
-
resetItemsGroup
-
isDebug
public boolean isDebug() -
setDebug
public void setDebug(boolean debug) -
isMaintenance
public boolean isMaintenance()Checks whether it's maintenance mode or not.- Returns:
- true - enabled, false - disabled.
-
setMaintenance
public void setMaintenance(boolean maintenance) Sets maintenance mode without command sender.If maintenance mode is same as specified, nothing will be changed.
If true - will unload all worlds and teleport players to lobby, and then prevent them from browsing and connecting to worlds.
If false - will allow players to visit their worlds.
- Parameters:
maintenance- true - enabled, false - disabled.
-
setMaintenance
public void setMaintenance(boolean maintenance, @Nullable @Nullable org.bukkit.command.CommandSender sender) Sets maintenance mode.If maintenance mode is same as specified, nothing will be changed.
If true - will unload all worlds and teleport players to lobby, and then prevent them from browsing and connecting to worlds.
If false - will allow players to visit their worlds.
- Parameters:
maintenance- true - enabled, false - disabled.sender- sender, who set maintenance mode.
-
getAllowedResourcePackLinks
-
getRecommendedWorldsIDs
-
isCreativeChatEnabled
public boolean isCreativeChatEnabled() -
setCreativeChatEnabled
public void setCreativeChatEnabled(boolean creativeChatEnabled) -
getListChanger
-
getGroups
Returns instance of groups, that stores all groups and contains methods to get data from them.- Returns:
- groups instance.
-
getItemFixerSettings
Returns settings of item fixer.- Returns:
- item fixer settings.
-
getWorldFixerSettings
Returns settings of world fixer.- Returns:
- world fixer settings.
-
getCodingSettings
Returns settings of coding mode.- Returns:
- coding settings.
-
getRequirements
Returns settings of requirements.- Returns:
- requirements settings.
-
getLobbySettings
Returns settings of lobby world.- Returns:
- lobby settings.
-
getWebSettings
Returns settings of web services.- Returns:
- web settings.
-
getDownloaderSettings
Returns settings of world downloader.- Returns:
- world downloader settings.
-
getEconomySettings
Returns settings of economy.- Returns:
- economy settings.
-
getCommands
Returns custom commands executions.- Returns:
- commands events.
-
shouldLogCriticalErrors
public boolean shouldLogCriticalErrors()Checks whether critical errors will be shown in console.- Returns:
- true - will be shown, false - hidden.
-
shouldLogGriefStats
public boolean shouldLogGriefStats()Checks whether grief stats will be shown in console.- Returns:
- true - will be shown, false - hidden.
-
shouldLogSignEdits
public boolean shouldLogSignEdits()Checks whether sign edits will be shown in console.- Returns:
- true - will be shown, false - hidden.
-
shouldLogWarnings
public boolean shouldLogWarnings()Checks whether warnings will be shown in console.- Returns:
- true - will be shown, false - hidden.
-
shouldLogNotFoundMessages
public boolean shouldLogNotFoundMessages()Checks whether not translated messages will be shown in console.- Returns:
- true - will be shown, false - hidden.
-
shouldCancelChatOnConfirmation
public boolean shouldCancelChatOnConfirmation()Checks whether player's messages should be hidden from chat, when they're changing world's or module's name or description.- Returns:
- true - will be hidden, false - shown.
-
shouldHandleWorldChat
public boolean shouldHandleWorldChat()Checks whether world chat and messages starting with ! will be handled by OpenCreative+.- Returns:
- true - will be handled, false - ignored, other plugins will be responsible.
-
getSounds
Returns a map of sounds and custom sounds from config.- Returns:
- map of sounds.
-
getItemsGroups
Returns a map of item groups and custom item groups from config.- Returns:
- map of item groups.
-
shouldNotifyAboutNoPlayersAround
public boolean shouldNotifyAboutNoPlayersAround()Checks whether player should see "No players around message" message, when there is no other players in their world.- Returns:
- true - will be shown, false - will be hidden.
-
getMessagesIgnoringReset
-
shouldGenerateFlatWorldHigher
public boolean shouldGenerateFlatWorldHigher()Checks whether flat world generator should generate a world starting with Y: 0, instead of Y: -64.- Returns:
- true - will generate higher (old versions), false - lower (newer).
-
isFirstLaunch
public boolean isFirstLaunch()Checks whether plugin was launched for first time, without /plugins/OpenCreative folder.- Returns:
- true - first time launched, false - was launched on server before.
-