Package com.winterhavenmc.library.messagebuilder.pipeline.adapters.location


package com.winterhavenmc.library.messagebuilder.pipeline.adapters.location
Provides support for extracting and formatting location-based macro values from objects.

This package includes the Locatable interface and its corresponding LocationAdapter implementation. It enables plugin-defined or Bukkit-provided objects to contribute detailed location information for use in macro-based message generation.

Macro Support

Objects implementing Locatable or adapting to it via LocationAdapter support the following placeholder macros:
  • {OBJECT.LOCATION} – Formatted location string (e.g., world [123, 64, -512])
  • {OBJECT.LOCATION.WORLD} – Resolved world name, optionally via Multiverse alias
  • {OBJECT.LOCATION.X}, {OBJECT.LOCATION.Y}, {OBJECT.LOCATION.Z} – Localized coordinate values

Many built-in Bukkit objects contain a location field that will be extracted by this adapter, including: Entity, Block, Inventory, LootContext, Raid, among others, including Location itself.

Integration with Multiverse-Core, if installed, allows location macros to display world aliases. If not present, standard Bukkit world names are used.

This package is part of the MessageBuilder macro adapter framework and contributes to the resolution and substitution of macro placeholders during the message pipeline.

See Also:
  • Class
    Description
    Represents an object that has a Location, which can be extracted and used for macro substitution in messages.
    Enumeration of subfields extractable from a Location.
    Adapter for objects that expose a Location, either directly or via a Locatable interface.