Package io.github.nacvark.hudengine.api
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.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordSomewhere a compass can point.static interfaceSupplies points for one player. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisRegistered(String id) voidregister(String id, HudCompass.Provider provider) Registers a source of moving points.voidunregister(String id)
-
Method Details
-
register
Registers a source of moving points. Registering the same id again replaces it. -
unregister
-
isRegistered
-