diff options
author | Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> | 2024-07-07 23:58:51 +0800 |
---|---|---|
committer | Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> | 2024-07-07 23:58:51 +0800 |
commit | 31e15f1b5bd664091461b5c17c2441b84a24d9eb (patch) | |
tree | 3c166cb7bca3fb535a91f117175f097568f0b7ff /src/main/java/de/hysky/skyblocker/utils/waypoint | |
parent | 15d0bfb2b98d994329cf118c56be71a4a11e4033 (diff) | |
download | Skyblocker-31e15f1b5bd664091461b5c17c2441b84a24d9eb.tar.gz Skyblocker-31e15f1b5bd664091461b5c17c2441b84a24d9eb.tar.bz2 Skyblocker-31e15f1b5bd664091461b5c17c2441b84a24d9eb.zip |
Fallback to current island when importing waypoints with invalid islands
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/utils/waypoint')
-rw-r--r-- | src/main/java/de/hysky/skyblocker/utils/waypoint/WaypointCategory.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/de/hysky/skyblocker/utils/waypoint/WaypointCategory.java b/src/main/java/de/hysky/skyblocker/utils/waypoint/WaypointCategory.java index db2a6d82..8bfef7f4 100644 --- a/src/main/java/de/hysky/skyblocker/utils/waypoint/WaypointCategory.java +++ b/src/main/java/de/hysky/skyblocker/utils/waypoint/WaypointCategory.java @@ -29,6 +29,10 @@ public record WaypointCategory(String name, String island, List<NamedWaypoint> w return new WaypointCategory(name, island(), waypoints()); } + public WaypointCategory withIsland(String island) { + return new WaypointCategory(name(), island, waypoints()); + } + public WaypointCategory deepCopy() { return new WaypointCategory(name(), island(), waypoints().stream().map(NamedWaypoint::copy).collect(Collectors.toList())); } |