public interface IServerOverlayAPI
Reach this from a server plugin via:
IServerOverlayAPI overlayApi = jmServerApi.getOverlayApi();
| Modifier and Type | Method and Description |
|---|---|
void |
clearAll(net.minecraft.server.level.ServerPlayer player,
java.lang.String modId)
Remove every overlay this addon has shown to the player.
|
void |
remove(net.minecraft.server.level.ServerPlayer player,
java.lang.String modId,
java.lang.String overlayId)
Remove a single overlay (by
modId + overlayId) from a
player's client. |
void |
show(net.minecraft.server.level.ServerPlayer player,
java.lang.String modId,
ServerPolygon... polygons)
Push polygon overlays to a single player.
|
void show(net.minecraft.server.level.ServerPlayer player,
java.lang.String modId,
ServerPolygon... polygons)
ServerPolygon's
overlayId is stable and addon-chosen; re-calling show()
with the same (modId, overlayId) replaces the prior version on
the client.
Calling with no polygons is a no-op. Calling for an offline or
disconnected ServerPlayer is a no-op.
player - the recipientmodId - the addon's mod id (becomes the JourneyMap displayable owner)polygons - one or more ServerPolygonsvoid remove(net.minecraft.server.level.ServerPlayer player,
java.lang.String modId,
java.lang.String overlayId)
modId + overlayId) from a
player's client. Calling for an offline player is a no-op; removing an
overlay that does not exist on the client is a silent no-op.player - the recipientmodId - the addon's mod idoverlayId - the addon-stable id used in a prior show()void clearAll(net.minecraft.server.level.ServerPlayer player,
java.lang.String modId)
player - the recipientmodId - the addon's mod id