Translations:Map Display/API/19/en

From BergerHealer Wiki
Revision as of 12:34, 3 September 2024 by TC Bot (talk | contribs) (Importing a new version from external source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

To include additional metadata for use in the display (properties field) you can also use the MapDisplayProperties class to build the item:

MapDisplayProperties prop = MapDisplayProperties.createNew(MyCustomDisplay.class);
prop.set("creator", player.getName());
prop.set("background", "https://url/to/some/image.png");
ItemStack item = prop.getMapItem();
// Rest is the same