@@ -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 );
0 commit comments