|
14 | 14 | import journeymap.api.v2.common.waypoint.WaypointGroup; |
15 | 15 | import net.blay09.mods.balm.api.Balm; |
16 | 16 | import net.blay09.mods.waystones.Waystones; |
17 | | -import net.blay09.mods.waystones.api.*; |
| 17 | +import net.blay09.mods.waystones.api.Waystone; |
| 18 | +import net.blay09.mods.waystones.api.WaystoneTypes; |
18 | 19 | import net.blay09.mods.waystones.api.event.WaystoneRemoveReceivedEvent; |
19 | 20 | import net.blay09.mods.waystones.api.event.WaystoneUpdateReceivedEvent; |
20 | 21 | import net.blay09.mods.waystones.api.event.WaystonesListReceivedEvent; |
@@ -73,8 +74,17 @@ public void initialize(IClientAPI iClientAPI) { |
73 | 74 | // This fires after all waypoints have been loaded |
74 | 75 | ClientEventRegistry.MAPPING_EVENT.subscribe(Waystones.MOD_ID, this::onMappingEvent); |
75 | 76 |
|
76 | | - waystonesGroup = WaypointFactory.createWaypointGroup(Waystones.MOD_ID, "waystones"); |
77 | | - sharestonesGroup = WaypointFactory.createWaypointGroup(Waystones.MOD_ID, "sharestones"); |
| 77 | + waystonesGroup = api.getWaypointGroupByName(Waystones.MOD_ID, "waystones"); |
| 78 | + if (waystonesGroup == null) { |
| 79 | + waystonesGroup = WaypointFactory.createWaypointGroup(Waystones.MOD_ID, "waystones"); |
| 80 | + api.addWaypointGroup(waystonesGroup); |
| 81 | + } |
| 82 | + |
| 83 | + sharestonesGroup = api.getWaypointGroupByName(Waystones.MOD_ID, "sharestones"); |
| 84 | + if (sharestonesGroup == null) { |
| 85 | + sharestonesGroup = WaypointFactory.createWaypointGroup(Waystones.MOD_ID, "sharestones"); |
| 86 | + api.addWaypointGroup(sharestonesGroup); |
| 87 | + } |
78 | 88 | } |
79 | 89 |
|
80 | 90 | /** |
|
0 commit comments