From 51c48350e82952b4e2f8ebab843c58e3355eb8ef Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 10 Dec 2023 00:45:14 +0100 Subject: removed wrapper and code cleanup --- .../skyhanni/config/features/markedplayer/MarkedPlayerConfig.java | 2 +- .../java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt | 2 +- .../hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/markedplayer/MarkedPlayerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/markedplayer/MarkedPlayerConfig.java index 264474b96..38b5b1981 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/markedplayer/MarkedPlayerConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/markedplayer/MarkedPlayerConfig.java @@ -27,6 +27,6 @@ public class MarkedPlayerConfig { @ConfigOption(name = "Marked Chat Color", desc = "Marked Chat Color. §eIf Chroma is gray, enable Chroma in Chroma settings") @Expose @ConfigEditorDropdown - public Property chatColor = Property.of(LorenzColor.YELLOW); + public LorenzColor chatColor = LorenzColor.YELLOW; } diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt index 43db53499..342550a17 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt @@ -42,7 +42,7 @@ class PlayerDeathMessages { ) { val reason = group("reason").removeColor() - val color = SkyHanniMod.feature.markedPlayers.chatColor.get().getChatColor() + val color = SkyHanniMod.feature.markedPlayers.chatColor.getChatColor() LorenzUtils.chat(" §c☠ $color$name §7$reason", false) event.blockedReason = "marked_player_death" return diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt index 7b52f6c60..a57c5a784 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/playerchat/PlayerChatModifier.kt @@ -79,13 +79,12 @@ class PlayerChatModifier { } if (SkyHanniMod.feature.markedPlayers.highlightInChat) { - val color = SkyHanniMod.feature.markedPlayers.chatColor.get().getChatColor() + val color = SkyHanniMod.feature.markedPlayers.chatColor.getChatColor() for (markedPlayer in MarkedPlayerManager.playerNamesToMark) { string = string.replace(markedPlayer, "$color$markedPlayer§r") } } - return string } -- cgit