Klasse ArenaSettings
java.lang.Object
de.delinkedde.mobarenareborn.arena.ArenaSettings
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.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic booleanbool(@NotNull Arena arena, @NotNull ConfigManager config, @NotNull String key, boolean defaultValue) Resolves a boolean setting.static intinteger(@NotNull Arena arena, @NotNull ConfigManager config, @NotNull String key, int defaultValue) Resolves an integer setting.static @NotNull Stringstring(@NotNull Arena arena, @NotNull ConfigManager config, @NotNull String key, @NotNull String defaultValue) Resolves a string setting.
-
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 arenaconfig- the configuration managerkey- the setting key without thearena.prefixdefaultValue- 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 arenaconfig- the configuration managerkey- the setting key without thearena.prefixdefaultValue- 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 arenaconfig- the configuration managerkey- the setting key without thearena.prefixdefaultValue- 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
-