Class InventoriesConfig

java.lang.Object
org.mvplugins.multiverse.inventories.config.InventoriesConfig

@Service public final class InventoriesConfig extends Object
Provides methods for interacting with the configuration of Multiverse-Inventories.
  • Field Details

  • Method Details

    • load

      public org.mvplugins.multiverse.external.vavr.control.Try<Void> 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.
    • getEnableGamemodeShareHandling

      public boolean getEnableGamemodeShareHandling()
      Returns:
      True if using separate data for game modes.
    • setEnableGamemodeShareHandling

      public org.mvplugins.multiverse.external.vavr.control.Try<Void> setEnableGamemodeShareHandling(boolean useGameModeProfile)
      Parameters:
      useGameModeProfile - whether to use separate data for game modes.
    • 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.
    • getActiveOptionalShares

      public Shares getActiveOptionalShares()
      Returns:
      A list of optional Sharables to be treated as regular Sharables throughout the code. A Sharable marked as optional is ignored if it is not contained in this list.
    • setActiveOptionalShares

      public org.mvplugins.multiverse.external.vavr.control.Try<Void> setActiveOptionalShares(Shares shares)
      Sets the optional shares to be used.
      Parameters:
      shares - The optional shares to be used.
      Returns:
      True if successful.
    • 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

      public List<String> getPreloadDataOnJoinWorlds()
    • setPreloadDataOnJoinWorlds

      public org.mvplugins.multiverse.external.vavr.control.Try<Void> setPreloadDataOnJoinWorlds(List<String> preloadDataOnJoinWorlds)
    • getPreloadDataOnJoinGroups

      public List<String> getPreloadDataOnJoinGroups()
    • setPreloadDataOnJoinGroups

      public org.mvplugins.multiverse.external.vavr.control.Try<Void> setPreloadDataOnJoinGroups(List<String> preloadDataOnJoinGroups)
    • 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

      public 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.
      Parameters:
      firstRun - What to set the flag to in the config.
    • save

      public org.mvplugins.multiverse.external.vavr.control.Try<Void> save()
      Saves the configuration file to disk.