aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-01-02 23:55:10 +0700
committerWyvest <45589059+Wyvest@users.noreply.github.com>2022-01-02 23:55:10 +0700
commitdf895d122a8a2ea249e686578e026c1d0a8b8c47 (patch)
treebb150064cc9c7ade2c28424d3867e131a26bf334 /src/main
parente02ba1f11a421618aaf357dd166aae005301e7ab (diff)
downloadChatting-df895d122a8a2ea249e686578e026c1d0a8b8c47.tar.gz
Chatting-df895d122a8a2ea249e686578e026c1d0a8b8c47.tar.bz2
Chatting-df895d122a8a2ea249e686578e026c1d0a8b8c47.zip
fix notification not opening file
Diffstat (limited to 'src/main')
-rw-r--r--src/main/kotlin/cc/woverflow/chattils/Chattils.kt4
-rw-r--r--src/main/kotlin/cc/woverflow/chattils/command/ChattilsCommand.kt2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main/kotlin/cc/woverflow/chattils/Chattils.kt b/src/main/kotlin/cc/woverflow/chattils/Chattils.kt
index c9714a2..5ae5c6b 100644
--- a/src/main/kotlin/cc/woverflow/chattils/Chattils.kt
+++ b/src/main/kotlin/cc/woverflow/chattils/Chattils.kt
@@ -150,8 +150,8 @@ object Chattils {
Minecraft.getMinecraft().entityRenderer.setupOverlayRendering()
Minecraft.getMinecraft().framebuffer.bindFramebuffer(true)
EssentialAPI.getNotifications()
- .push("Chattils", "Chat screenshotted successfully.\nClick to open.") {
- if (!UDesktop.browse(file.toURI())) {
+ .push("Chattils", "Chat screenshotted successfully." + (if (ChattilsConfig.copyMode != 1) "\nClick to open." else "")) {
+ if (!UDesktop.open(file)) {
EssentialAPI.getNotifications().push("Chattils", "Could not browse!")
}
}
diff --git a/src/main/kotlin/cc/woverflow/chattils/command/ChattilsCommand.kt b/src/main/kotlin/cc/woverflow/chattils/command/ChattilsCommand.kt
index aa162e1..67dd30e 100644
--- a/src/main/kotlin/cc/woverflow/chattils/command/ChattilsCommand.kt
+++ b/src/main/kotlin/cc/woverflow/chattils/command/ChattilsCommand.kt
@@ -8,6 +8,8 @@ import gg.essential.api.commands.DefaultHandler
object ChattilsCommand : Command(Chattils.ID, true) {
+ override val commandAliases: Set<Alias> = setOf(Alias("stratus"))
+
@DefaultHandler
fun handle() {
EssentialAPI.getGuiUtil().openScreen(ChattilsConfig.gui())