From d9b8ea53eb11c512af26fccd4428f04a79b57e2d Mon Sep 17 00:00:00 2001 From: Lukas Planz Date: Mon, 23 Oct 2023 18:07:15 +0200 Subject: [PATCH] Fix default colors for beacon beams not being applied --- CHANGELOG.md | 3 +++ .../waypoints/config/pointers/BeaconConfigurationImpl.kt | 8 ++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8de2b3d..173d6e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,9 @@ - The default config has been updated to replace some items with custom player heads - Holograms are now multiline by default +### Fixed +- Default colors for beacon beams are not applied + ## 4.2.0 ### Added diff --git a/waypoints/src/main/kotlin/de/md5lukas/waypoints/config/pointers/BeaconConfigurationImpl.kt b/waypoints/src/main/kotlin/de/md5lukas/waypoints/config/pointers/BeaconConfigurationImpl.kt index 68399c6..8e2a8b6 100644 --- a/waypoints/src/main/kotlin/de/md5lukas/waypoints/config/pointers/BeaconConfigurationImpl.kt +++ b/waypoints/src/main/kotlin/de/md5lukas/waypoints/config/pointers/BeaconConfigurationImpl.kt @@ -6,11 +6,7 @@ import de.md5lukas.konfig.Configurable import de.md5lukas.konfig.TypeAdapter import de.md5lukas.konfig.UseAdapter import de.md5lukas.waypoints.api.Type -import de.md5lukas.waypoints.api.Waypoint -import de.md5lukas.waypoints.pointers.BeaconColor -import de.md5lukas.waypoints.pointers.PlayerTrackable -import de.md5lukas.waypoints.pointers.TemporaryWaypointTrackable -import de.md5lukas.waypoints.pointers.Trackable +import de.md5lukas.waypoints.pointers.* import de.md5lukas.waypoints.pointers.config.BeaconConfiguration import org.bukkit.Bukkit import org.bukkit.Material @@ -44,7 +40,7 @@ class BeaconConfigurationImpl : RepeatingPointerConfigurationImpl(), BeaconConfi override fun getDefaultColor(trackable: Trackable) = when (trackable) { - is Waypoint -> defaultColor[trackable.type] + is WaypointTrackable -> defaultColor[trackable.waypoint.type] is PlayerTrackable -> playerTrackableColor is TemporaryWaypointTrackable -> temporaryTrackableColor else -> null