Interface IConfig

All Superinterfaces:
IRestartable
All Known Subinterfaces:
IConfigSpigot
All Known Implementing Classes:
AbstractConfig

public interface IConfig extends IRestartable
Represents the configured settings.
  • Method Details

    • debug

      boolean debug()
      Returns whether debug mode is enabled.
      Returns:
      True if debug mode is enabled.
    • allowRedstone

      boolean allowRedstone()
      Returns whether redstone is enabled.
      Returns:
      True if redstone is enabled.
    • specificationTimeout

      default int specificationTimeout()
      The amount of time a user gets to specify which structure they meant in case of structureID collisions.

      This can happen in case they specified a structure by its name when they own more than 1 structure with that name.

      Returns:
      The amount of time (in seconds) to give a user to specify which structure they meant.
    • flagMovementFormula

      String flagMovementFormula()
      Returns the movement formula of a flag.
      Returns:
      The movement formula of a flag.
    • locale

      Locale locale()
      The default locale to use.
      Returns:
      The default locale to use.
    • allowClientLocale

      boolean allowClientLocale()
      Whether to allow the client locale to be used.
      Returns:
      True to try to use a player's locale.
    • maxStructureSize

      OptionalInt maxStructureSize()
      Gets the global maximum number of blocks that can be in a structure.

      Structures exceeding this limit cannot be created or activated.

      Returns:
      The global maximum number of blocks that can be in a structure.
    • powerblockCacheTimeout

      int powerblockCacheTimeout()
      Gets the amount of time (in minutes) power blocks should be kept in cache.
      Returns:
      The amount of time power blocks should be kept in cache.
    • maxStructureCount

      OptionalInt maxStructureCount()
      Gets the global maximum number of structures a player can own.
      Returns:
      The global maximum number of structures a player can own.
    • maxPowerblockDistance

      OptionalInt maxPowerblockDistance()
      Gets the global maximum distance (in blocks) a powerblock can be from the structure.
      Returns:
      The global maximum distance (in blocks) a powerblock can be from the structure.
    • maxBlocksToMove

      OptionalInt maxBlocksToMove()
      Gets the global maximum number of blocks a structure can move for applicable types (e.g. sliding door).
      Returns:
      The global maximum number of blocks a structure can move for applicable types (e.g. sliding door).
    • maxBlockSpeed

      OptionalDouble maxBlockSpeed()
      Returns the global maximum speed of a block in blocks per second.
      Returns:
      The global maximum speed of a block.
    • loadChunksForToggle

      boolean loadChunksForToggle()
      Returns whether we should try to load any unloaded chunks for a toggle.
      Returns:
      True if we should try to load any unloaded chunks for a toggle.
    • priceFormula

      String priceFormula(StructureType type)
      Gets the structure price formula for a specific type of structure.
      Parameters:
      type - The structure type.
      Returns:
      The formula for the structure type.
    • isStructureTypeEnabled

      boolean isStructureTypeEnabled(StructureType type)
      Checks if a specific type of structure is enabled.
      Parameters:
      type - The structure type.
      Returns:
      True if the structure type is enabled.
    • animationTimeMultiplier

      double animationTimeMultiplier(StructureType type)
      Gets the animation time multiplier for a specific type of structure.
      Parameters:
      type - The structure type.
      Returns:
      The animation time multiplier for the structure type.
    • skipAnimationsByDefault

      boolean skipAnimationsByDefault()
      Whether to skip all animations by default. If true, toggling a structure will simply teleport the blocks to their destination without any animations. For structures that don't have a destination, any toggle request will be ignored.
      Returns:
      True if all animations should be skipped by default.
    • logLevel

      Level logLevel()
      The log level to use.
      Returns:
      The log level.
    • reloadConfig

      void reloadConfig()
      Reloads the configuration file.
    • isOldConfigPresent

      default boolean isOldConfigPresent()
      Returns whether the old configuration file (config.yml) exists.

      If it does, it means the user has not yet migrated their configuration to the new format (config.yaml).

      This value is re-evaluated on each config reload, so it reflects the current state of the file system.

      Returns:
      True if the old configuration file currently exists.
    • primaryCommandName

      String primaryCommandName()
      Gets the primary command name for the plugin.

      This is the first alias in the command aliases list, or a default value if no aliases are configured.

      Returns:
      The primary command name.