Klasse ArenaSettings

java.lang.Object
de.delinkedde.mobarenareborn.arena.ArenaSettings

public final class ArenaSettings extends Object
Resolves an arena.* setting, preferring a per-arena override over the global default.

Each arena may override selected settings (for example min-players or boss-every) in its own file; when no override is present the value falls back to the global arena.<key> in config.yml.

  • Methodendetails

    • integer

      public static int integer(@NotNull @NotNull Arena arena, @NotNull @NotNull ConfigManager config, @NotNull @NotNull String key, int defaultValue)
      Resolves an integer setting.
      Parameter:
      arena - the arena
      config - the configuration manager
      key - the setting key without the arena. prefix
      defaultValue - the fallback when neither an override nor a global value is present
      Gibt zurück:
      the per-arena override, otherwise the global value, otherwise the default
    • string

      @NotNull public static @NotNull String string(@NotNull @NotNull Arena arena, @NotNull @NotNull ConfigManager config, @NotNull @NotNull String key, @NotNull @NotNull String defaultValue)
      Resolves a string setting.
      Parameter:
      arena - the arena
      config - the configuration manager
      key - the setting key without the arena. prefix
      defaultValue - the fallback when neither an override nor a global value is present
      Gibt zurück:
      the per-arena override, otherwise the global value, otherwise the default
    • bool

      public static boolean bool(@NotNull @NotNull Arena arena, @NotNull @NotNull ConfigManager config, @NotNull @NotNull String key, boolean defaultValue)
      Resolves a boolean setting. Per-arena overrides are stored as strings, so "true" and "false" override the global value.
      Parameter:
      arena - the arena
      config - the configuration manager
      key - the setting key without the arena. prefix
      defaultValue - the fallback when neither an override nor a global value is present
      Gibt zurück:
      the per-arena override, otherwise the global value, otherwise the default