Skip to content

Commit 66de997

Browse files
tastybentoclaude
andcommitted
Enable HTML markup in Dynmap point marker labels
Pass isMarkupLabel=true to createMarker so addons can use HTML formatting (e.g. colored owner names) in marker labels. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 689510d commit 66de997

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/world/bentobox/bentobox/hooks/DynmapHook.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ public void addPointMarker(@NonNull String markerSetId, @NonNull String markerId
241241
if (icon == null) {
242242
icon = markerAPI.getMarkerIcon("default");
243243
}
244-
markerSet.createMarker(markerId, label, location.getWorld().getName(), location.getX(), location.getY(),
245-
location.getZ(), icon, true);
244+
markerSet.createMarker(markerId, label, true, location.getWorld().getName(), location.getX(),
245+
location.getY(), location.getZ(), icon, true);
246246
}
247247

248248
@Override

src/test/java/world/bentobox/bentobox/hooks/DynmapHookTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ void testAddPointMarkerUsesCustomIcon() {
442442
when(loc.getZ()).thenReturn(20.0);
443443

444444
hook.addPointMarker("warps", "marker1", "My Warp", loc, "sign");
445-
verify(markerSet).createMarker("marker1", "My Warp", "bskyblock_world",
445+
verify(markerSet).createMarker("marker1", "My Warp", true, "bskyblock_world",
446446
10.0, 64.0, 20.0, signIcon, true);
447447
}
448448

@@ -458,7 +458,7 @@ void testAddPointMarkerFallsBackToDefaultIcon() {
458458
when(loc.getZ()).thenReturn(20.0);
459459

460460
hook.addPointMarker("warps", "marker1", "My Warp", loc, "nonexistent");
461-
verify(markerSet).createMarker("marker1", "My Warp", "bskyblock_world",
461+
verify(markerSet).createMarker("marker1", "My Warp", true, "bskyblock_world",
462462
10.0, 64.0, 20.0, defaultIcon, true);
463463
}
464464
}

0 commit comments

Comments
 (0)