Klasse RewardService

java.lang.Object
de.delinkedde.mobarenareborn.reward.RewardService

public final class RewardService extends Object
Loads and provides the wave-completion rewards from rewards.yml.

Each configured wave number maps to a list of item specifications. When a player clears that wave the corresponding items are earned and later handed into their real inventory. Only listed waves grant rewards; the numbers are free to choose (they do not have to be regular steps).

  • Konstruktordetails

    • RewardService

      public RewardService(@NotNull @NotNull MobArenaPlugin plugin)
      Parameter:
      plugin - the owning plugin, used for the data folder and logging
  • Methodendetails

    • load

      public void load()
      Loads (or reloads) the wave rewards from rewards.yml, writing the default file if absent.
    • forWave

      @NotNull public @NotNull List<ItemStack> forWave(int wave)
      Returns fresh item stacks configured for clearing the given wave.
      Parameter:
      wave - the cleared wave number
      Gibt zurück:
      a new list of item stacks, empty if the wave has no rewards