Class InventoriesConfig
java.lang.Object
org.mvplugins.multiverse.inventories.config.InventoriesConfig
Provides methods for interacting with the configuration of Multiverse-Inventories.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
org.bukkit.configuration.file.FileConfiguration
boolean
boolean
boolean
boolean
Tells whether this is the first time the plugin has run as set by a config flag.int
int
int
int
int
int
boolean
Get the value of registerPapiHookboolean
org.mvplugins.multiverse.core.config.handle.StringPropertyHandle
boolean
boolean
boolean
Whether Multiverse-Inventories will utilize optional shares in worlds that are not grouped.org.mvplugins.multiverse.external.vavr.control.Try
<Void> load()
org.mvplugins.multiverse.external.vavr.control.Try
<Void> save()
Saves the configuration file to disk.org.mvplugins.multiverse.external.vavr.control.Try
<Void> setActiveOptionalShares
(Shares shares) Sets the optional shares to be used.org.mvplugins.multiverse.external.vavr.control.Try
<Void> setAlwaysWriteWorldProfile
(boolean alwaysWriteWorldProfile) org.mvplugins.multiverse.external.vavr.control.Try
<Void> setApplyLastLocationForAllTeleports
(boolean applyLastLocationForAllTeleports) org.mvplugins.multiverse.external.vavr.control.Try
<Void> setApplyPlayerdataOnJoin
(boolean applyPlayerdataOnJoin) org.mvplugins.multiverse.external.vavr.control.Try
<Void> setDefaultUngroupedWorlds
(boolean useDefaultGroup) org.mvplugins.multiverse.external.vavr.control.Try
<Void> setEnableBypassPermissions
(boolean useBypass) org.mvplugins.multiverse.external.vavr.control.Try
<Void> setEnableGamemodeShareHandling
(boolean useGameModeProfile) org.mvplugins.multiverse.external.vavr.control.Try
<Void> setFirstRun
(boolean firstRun) Sets the first_run flag in the config so that the plugin no longer thinks it is the first run.org.mvplugins.multiverse.external.vavr.control.Try
<Void> setGlobalProfileCacheExpiry
(int globalProfileCacheExpiry) org.mvplugins.multiverse.external.vavr.control.Try
<Void> setGlobalProfileCacheSize
(int globalProfileCacheSize) org.mvplugins.multiverse.external.vavr.control.Try
<Void> setPlayerFileCacheExpiry
(int playerFileCacheExpiry) org.mvplugins.multiverse.external.vavr.control.Try
<Void> setPlayerFileCacheSize
(int playerFileCacheSize) org.mvplugins.multiverse.external.vavr.control.Try
<Void> setPlayerProfileCacheExpiry
(int playerProfileCacheExpiry) org.mvplugins.multiverse.external.vavr.control.Try
<Void> setPlayerProfileCacheSize
(int playerProfileCacheSize) org.mvplugins.multiverse.external.vavr.control.Try
<Void> setPreloadDataOnJoinGroups
(List<String> preloadDataOnJoinGroups) org.mvplugins.multiverse.external.vavr.control.Try
<Void> setPreloadDataOnJoinWorlds
(List<String> preloadDataOnJoinWorlds) org.mvplugins.multiverse.external.vavr.control.Try
<Void> setRegisterPapiHook
(boolean registerPapiHook) Sets the value of registerPapiHookorg.mvplugins.multiverse.external.vavr.control.Try
<Void> setResetLastLocationOnDeath
(boolean resetLastLocationOnDeath) org.mvplugins.multiverse.external.vavr.control.Try
<Void> setUseByteSerializationForInventoryData
(boolean useByteSerializationForInventoryData) org.mvplugins.multiverse.external.vavr.control.Try
<Void> setUseImprovedRespawnLocationDetection
(boolean useImprovedRespawnLocationDetection) org.mvplugins.multiverse.external.vavr.control.Try
<Void> setUseOptionalsForUngroupedWorlds
(boolean usingOptionalsForUngrouped) Sets whether Multiverse-Inventories will utilize optional shares in worlds that are not grouped.
-
Field Details
-
CONFIG_FILENAME
- See Also:
-
-
Method Details
-
load
-
getConfig
public org.bukkit.configuration.file.FileConfiguration getConfig() -
getStringPropertyHandle
public org.mvplugins.multiverse.core.config.handle.StringPropertyHandle getStringPropertyHandle() -
getEnableBypassPermissions
public boolean getEnableBypassPermissions()- Returns:
- True if we should check for bypass permissions.
-
setEnableBypassPermissions
public org.mvplugins.multiverse.external.vavr.control.Try<Void> setEnableBypassPermissions(boolean useBypass) - Parameters:
useBypass
- Whether or not to check for bypass permissions.
-
getDefaultUngroupedWorlds
public boolean getDefaultUngroupedWorlds()- Returns:
- true if worlds with no group should be considered part of the default group.
-
setDefaultUngroupedWorlds
public org.mvplugins.multiverse.external.vavr.control.Try<Void> setDefaultUngroupedWorlds(boolean useDefaultGroup) - Parameters:
useDefaultGroup
- Set this to true to use the default group for ungrouped worlds.
-
getUseOptionalsForUngroupedWorlds
public boolean getUseOptionalsForUngroupedWorlds()Whether Multiverse-Inventories will utilize optional shares in worlds that are not grouped.- Returns:
- true if should utilize optional shares in worlds that are not grouped.
-
setUseOptionalsForUngroupedWorlds
public org.mvplugins.multiverse.external.vavr.control.Try<Void> setUseOptionalsForUngroupedWorlds(boolean usingOptionalsForUngrouped) Sets whether Multiverse-Inventories will utilize optional shares in worlds that are not grouped.- Parameters:
usingOptionalsForUngrouped
- true if should utilize optional shares in worlds that are not grouped.
-
getUseImprovedRespawnLocationDetection
public boolean getUseImprovedRespawnLocationDetection() -
setUseImprovedRespawnLocationDetection
public org.mvplugins.multiverse.external.vavr.control.Try<Void> setUseImprovedRespawnLocationDetection(boolean useImprovedRespawnLocationDetection) -
getResetLastLocationOnDeath
public boolean getResetLastLocationOnDeath() -
setResetLastLocationOnDeath
public org.mvplugins.multiverse.external.vavr.control.Try<Void> setResetLastLocationOnDeath(boolean resetLastLocationOnDeath) -
getApplyLastLocationForAllTeleports
public boolean getApplyLastLocationForAllTeleports() -
setApplyLastLocationForAllTeleports
public org.mvplugins.multiverse.external.vavr.control.Try<Void> setApplyLastLocationForAllTeleports(boolean applyLastLocationForAllTeleports) -
getUseByteSerializationForInventoryData
public boolean getUseByteSerializationForInventoryData() -
setUseByteSerializationForInventoryData
public org.mvplugins.multiverse.external.vavr.control.Try<Void> setUseByteSerializationForInventoryData(boolean useByteSerializationForInventoryData) -
getApplyPlayerdataOnJoin
public boolean getApplyPlayerdataOnJoin() -
setApplyPlayerdataOnJoin
public org.mvplugins.multiverse.external.vavr.control.Try<Void> setApplyPlayerdataOnJoin(boolean applyPlayerdataOnJoin) -
getAlwaysWriteWorldProfile
public boolean getAlwaysWriteWorldProfile() -
setAlwaysWriteWorldProfile
public org.mvplugins.multiverse.external.vavr.control.Try<Void> setAlwaysWriteWorldProfile(boolean alwaysWriteWorldProfile) -
getPreloadDataOnJoinWorlds
-
setPreloadDataOnJoinWorlds
-
getPreloadDataOnJoinGroups
-
setPreloadDataOnJoinGroups
-
getPlayerFileCacheSize
public int getPlayerFileCacheSize() -
setPlayerFileCacheSize
public org.mvplugins.multiverse.external.vavr.control.Try<Void> setPlayerFileCacheSize(int playerFileCacheSize) -
getPlayerFileCacheExpiry
public int getPlayerFileCacheExpiry() -
setPlayerFileCacheExpiry
public org.mvplugins.multiverse.external.vavr.control.Try<Void> setPlayerFileCacheExpiry(int playerFileCacheExpiry) -
getPlayerProfileCacheSize
public int getPlayerProfileCacheSize() -
setPlayerProfileCacheSize
public org.mvplugins.multiverse.external.vavr.control.Try<Void> setPlayerProfileCacheSize(int playerProfileCacheSize) -
getPlayerProfileCacheExpiry
public int getPlayerProfileCacheExpiry() -
setPlayerProfileCacheExpiry
public org.mvplugins.multiverse.external.vavr.control.Try<Void> setPlayerProfileCacheExpiry(int playerProfileCacheExpiry) -
getGlobalProfileCacheSize
public int getGlobalProfileCacheSize() -
setGlobalProfileCacheSize
public org.mvplugins.multiverse.external.vavr.control.Try<Void> setGlobalProfileCacheSize(int globalProfileCacheSize) -
getGlobalProfileCacheExpiry
public int getGlobalProfileCacheExpiry() -
setGlobalProfileCacheExpiry
public org.mvplugins.multiverse.external.vavr.control.Try<Void> setGlobalProfileCacheExpiry(int globalProfileCacheExpiry) -
getRegisterPapiHook
@AvailableSince("5.1") public boolean getRegisterPapiHook()Get the value of registerPapiHook- Returns:
- The value of registerPapiHook
- Since:
- 5.1
-
setRegisterPapiHook
@AvailableSince("5.1") public org.mvplugins.multiverse.external.vavr.control.Try<Void> setRegisterPapiHook(boolean registerPapiHook) Sets the value of registerPapiHook- Parameters:
registerPapiHook
- The value of registerPapiHook- Returns:
- The result of the operation
- Since:
- 5.1
-
getFirstRun
public boolean getFirstRun()Tells whether this is the first time the plugin has run as set by a config flag.- Returns:
- True if first_run is set to true in config.
-
setFirstRun
Sets the first_run flag in the config so that the plugin no longer thinks it is the first run.- Parameters:
firstRun
- What to set the flag to in the config.
-
save
Saves the configuration file to disk.
-