diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-29 21:19:09 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-29 21:19:09 +0200 |
commit | 68c9844d02e7ceb13b8dcf6f090cef5a8ce6f037 (patch) | |
tree | 6ae5ece61222d63df770d9c19c86bab659e739c6 /src/main/java/at | |
parent | 598ee0804c274d06a22156ab0f5361caf23e3c53 (diff) | |
download | skyhanni-68c9844d02e7ceb13b8dcf6f090cef5a8ce6f037.tar.gz skyhanni-68c9844d02e7ceb13b8dcf6f090cef5a8ce6f037.tar.bz2 skyhanni-68c9844d02e7ceb13b8dcf6f090cef5a8ce6f037.zip |
code cleanup
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt index a1f40c6e9..ef9bd1e75 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt @@ -9,7 +9,7 @@ import net.minecraft.command.CommandBase import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object DefaultConfigFeatures { - var didNotifyOnce = false + private var didNotifyOnce = false @SubscribeEvent fun onTick(event: LorenzTickEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt index 248efd5df..4e01f5da6 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt @@ -234,9 +234,10 @@ object LorenzUtils { fun clickableChat(message: String, command: String) { val text = ChatComponentText(message) - text.chatStyle.chatClickEvent = ClickEvent(ClickEvent.Action.RUN_COMMAND, "/${command.removePrefix("/")}") + val fullCommand = "/" + command.removePrefix("/") + text.chatStyle.chatClickEvent = ClickEvent(ClickEvent.Action.RUN_COMMAND, fullCommand) text.chatStyle.chatHoverEvent = - HoverEvent(HoverEvent.Action.SHOW_TEXT, ChatComponentText("§eExecute /${command.removePrefix("/")}")) + HoverEvent(HoverEvent.Action.SHOW_TEXT, ChatComponentText("§eExecute $fullCommand")) Minecraft.getMinecraft().thePlayer.addChatMessage(text) } |