Interface HudCompass


public interface HudCompass
Where a plugin publishes points for compasses to point at.

Fixed points belong in points/*.yml. This is for points that move or come and go:


 hud.compass().register("quests", player -> quests.activeFor(player).stream()
         .map(quest -> CompassPoint.at(quest.location(), "quest"))
         .toList());
 

The engine draws what a provider returns and does not ask why. Deciding whether a player has an available quest is the quest plugin's job, not the HUD's.

A provider runs once per HUD tick per player, on that player's own thread. Returning null means no points.

  • Method Details

    • register

      void register(String id, HudCompass.Provider provider)
      Registers a source of moving points. Registering the same id again replaces it.
    • unregister

      void unregister(String id)
    • isRegistered

      boolean isRegistered(String id)