Klasse BossRegistry
java.lang.Object
de.delinkedde.mobarenareborn.boss.BossRegistry
Loads and holds the configured bosses from
bosses.yml.
On first run the bundled default bosses.yml is written to the data folder. Each entry
is parsed by BossDefinition.fromSection(String, ConfigurationSection); malformed entries
are skipped with a warning rather than aborting the load.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibung@NotNull Collection<BossDefinition> all()@NotNull Optional<BossDefinition> any()Returns the first registered boss, used as the fallback for boss waves.@NotNull Optional<BossDefinition> Resolves a boss by identifier, ignoring case.voidload()Loads (or reloads) all bosses frombosses.yml, writing the default file if absent.random()voidregister(@NotNull BossDefinition definition) Registers (or replaces) a boss definition.
-
Konstruktordetails
-
BossRegistry
- Parameter:
plugin- the owning plugin
-
-
Methodendetails
-
random
- Gibt zurück:
- a random registered boss definition, if any exist
-
load
public void load()Loads (or reloads) all bosses frombosses.yml, writing the default file if absent. -
register
Registers (or replaces) a boss definition.- Parameter:
definition- the definition to register
-
get
Resolves a boss by identifier, ignoring case.- Parameter:
id- the boss identifier- Gibt zurück:
- the definition, if present
-
any
Returns the first registered boss, used as the fallback for boss waves.- Gibt zurück:
- the first boss, if any are defined
-
all
- Gibt zurück:
- an unmodifiable view of all boss definitions
-