Skip to content

Commit bc8888d

Browse files
tastybentoclaude
andcommitted
Remove debug logging from DynmapHook and BlueMapHook
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8ad4bbb commit bc8888d

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,16 @@ public boolean hook() {
6868
*/
6969
public void registerGameMode(@NonNull GameModeAddon addon) {
7070
String friendlyName = addon.getWorldSettings().getFriendlyName();
71-
plugin.logDebug("Setting markers for Game Mode '" + friendlyName + "'");
71+
7272
MarkerSet markerSet = markerSets.computeIfAbsent(friendlyName, k -> {
73-
plugin.logDebug("Making a new marker set for '" + k + "'");
73+
7474
return MarkerSet.builder().toggleable(true).defaultHidden(false).label(k).build();
7575
});
7676
// Create a marker for each owned island in this addon's overworld
7777
plugin.getIslands().getIslands(addon.getOverWorld()).stream()
7878
.filter(is -> is.getOwner() != null)
7979
.forEach(island -> {
80-
plugin.logDebug("Creating marker for " + island.getCenter());
80+
8181
setMarker(markerSet, island);
8282
});
8383
// Overworld
@@ -96,9 +96,9 @@ public void registerGameMode(@NonNull GameModeAddon addon) {
9696

9797
private void addMarkerSetToWorld(World world, String markerSetId, MarkerSet markerSet) {
9898
api.getWorld(world).ifPresent(bmWorld -> {
99-
plugin.logDebug("BlueMap knows about " + bmWorld.getId());
99+
100100
for (BlueMapMap map : bmWorld.getMaps()) {
101-
plugin.logDebug("Adding markerSet to " + map.getName() + " map");
101+
102102
map.getMarkerSets().put(markerSetId, markerSet);
103103
}
104104
});
@@ -107,7 +107,7 @@ private void addMarkerSetToWorld(World world, String markerSetId, MarkerSet mark
107107
private void setMarker(MarkerSet markerSet, Island island) {
108108
String label = getIslandLabel(island);
109109
String id = island.getUniqueId();
110-
plugin.logDebug("Adding a marker called '" + label + "' for island " + id);
110+
111111
// Point marker at island center for the label/icon
112112
POIMarker marker = POIMarker.builder().label(label).listed(true).defaultIcon()
113113
.position(island.getCenter().getX(), island.getCenter().getY(), island.getCenter().getZ())
@@ -275,20 +275,20 @@ public void onBentoBoxReady(BentoBoxReadyEvent e) {
275275

276276
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
277277
public void onNewIsland(IslandNewIslandEvent e) {
278-
plugin.logDebug(e.getEventName());
278+
279279
plugin.getIWM().getAddon(e.getIsland().getWorld()).ifPresent(addon -> add(e.getIsland(), addon));
280280
}
281281

282282
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
283283
public void onIslandDelete(IslandDeleteEvent e) {
284-
plugin.logDebug(e.getEventName());
284+
285285
plugin.getIWM().getAddon(e.getIsland().getWorld())
286286
.ifPresent(addon -> remove(e.getIsland().getUniqueId(), addon));
287287
}
288288

289289
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
290290
public void onIslandName(IslandNameEvent e) {
291-
plugin.logDebug(e.getEventName());
291+
292292
plugin.getIWM().getAddon(e.getIsland().getWorld()).ifPresent(addon -> {
293293
remove(e.getIsland().getUniqueId(), addon);
294294
add(e.getIsland(), addon);
@@ -297,7 +297,7 @@ public void onIslandName(IslandNameEvent e) {
297297

298298
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
299299
public void onIslandReset(IslandResettedEvent e) {
300-
plugin.logDebug(e.getEventName());
300+
301301
plugin.getIWM().getAddon(e.getIsland().getWorld()).ifPresent(addon -> {
302302
remove(e.getOldIsland().getUniqueId(), addon);
303303
add(e.getIsland(), addon);

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ public boolean hook() {
7979
public void registerGameMode(@NonNull GameModeAddon addon) {
8080
String friendlyName = addon.getWorldSettings().getFriendlyName();
8181
String markerSetId = friendlyName.toLowerCase(Locale.ENGLISH) + ".markers";
82-
plugin.logDebug("Setting markers for Game Mode '" + friendlyName + "'");
82+
8383
MarkerSet markerSet = markerSets.computeIfAbsent(friendlyName, k -> {
84-
plugin.logDebug("Making a new marker set for '" + k + "'");
84+
8585
// Dynmap persists marker sets — check for existing one first
8686
MarkerSet existing = markerAPI.getMarkerSet(markerSetId);
8787
if (existing != null) {
@@ -97,7 +97,7 @@ public void registerGameMode(@NonNull GameModeAddon addon) {
9797
plugin.getIslands().getIslands(addon.getOverWorld()).stream()
9898
.filter(is -> is.getOwner() != null)
9999
.forEach(island -> {
100-
plugin.logDebug("Creating marker for " + island.getCenter());
100+
101101
setMarker(markerSet, island);
102102
});
103103
}
@@ -110,7 +110,7 @@ private void setMarker(MarkerSet markerSet, Island island) {
110110
return;
111111
}
112112
String worldName = w.getName();
113-
plugin.logDebug("Adding a marker called '" + label + "' for island " + id);
113+
114114
// Remove existing markers if present
115115
Marker existingMarker = markerSet.findMarker(id);
116116
if (existingMarker != null) {
@@ -307,20 +307,20 @@ public void onBentoBoxReady(BentoBoxReadyEvent e) {
307307

308308
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
309309
public void onNewIsland(IslandNewIslandEvent e) {
310-
plugin.logDebug(e.getEventName());
310+
311311
plugin.getIWM().getAddon(e.getIsland().getWorld()).ifPresent(addon -> add(e.getIsland(), addon));
312312
}
313313

314314
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
315315
public void onIslandDelete(IslandDeleteEvent e) {
316-
plugin.logDebug(e.getEventName());
316+
317317
plugin.getIWM().getAddon(e.getIsland().getWorld())
318318
.ifPresent(addon -> remove(e.getIsland().getUniqueId(), addon));
319319
}
320320

321321
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
322322
public void onIslandName(IslandNameEvent e) {
323-
plugin.logDebug(e.getEventName());
323+
324324
plugin.getIWM().getAddon(e.getIsland().getWorld()).ifPresent(addon -> {
325325
remove(e.getIsland().getUniqueId(), addon);
326326
add(e.getIsland(), addon);
@@ -329,7 +329,7 @@ public void onIslandName(IslandNameEvent e) {
329329

330330
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
331331
public void onIslandReset(IslandResettedEvent e) {
332-
plugin.logDebug(e.getEventName());
332+
333333
plugin.getIWM().getAddon(e.getIsland().getWorld()).ifPresent(addon -> {
334334
remove(e.getOldIsland().getUniqueId(), addon);
335335
add(e.getIsland(), addon);

0 commit comments

Comments
 (0)