Klasse InfoSigns

java.lang.Object
de.delinkedde.mobarenareborn.sign.InfoSigns
Alle implementierten Schnittstellen:
Listener

public final class InfoSigns extends Object implements Listener
Live arena info signs.

An info sign shows the current state of one arena and refreshes every two seconds: while idle it invites players, while the lobby fills it shows the ready counter, and during a round it shows the current wave and the living fighters. The line templates are configurable (signs.info-idle / -joining / -running, MiniMessage with placeholders <arena>, <players>, <ready>, <wave>, <alive>). Signs are persisted in infosigns.yml and survive restarts; breaking a registered sign (as a builder) unregisters it.

  • Konstruktordetails

    • InfoSigns

      public InfoSigns(@NotNull @NotNull MobArenaPlugin plugin, @NotNull @NotNull ConfigManager config, @NotNull @NotNull SessionManager sessions)
      Parameter:
      plugin - the owning plugin, used for scheduling and the data folder
      config - the configuration manager holding the line templates
      sessions - the session manager the sign state is read from
  • Methodendetails

    • start

      public void start()
      Starts the periodic refresh (every two seconds).
    • register

      public void register(@NotNull @NotNull Block block, @NotNull @NotNull String arenaName)
      Registers a block as an info sign for an arena and persists the registration.
      Parameter:
      block - the sign block
      arenaName - the arena identifier
    • onBreak

      public void onBreak(@NotNull @NotNull BlockBreakEvent event)
      Unregisters a broken info sign.
      Parameter:
      event - the break event