Skip to content

Commit 669eb56

Browse files
committed
❇️ 명령어 실행시 클릭하여 복사
1 parent 557d610 commit 669eb56

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/main/kotlin/io/dashify/plugin/DashifyCommand.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ package io.dashify.plugin
33
import io.dashify.plugin.util.ConfigHandler
44
import io.dashify.plugin.util.StringUtil
55
import net.kyori.adventure.text.Component.text
6+
import net.kyori.adventure.text.event.ClickEvent
67
import net.kyori.adventure.text.format.TextColor
8+
import net.kyori.adventure.text.format.TextDecoration
79
import org.bukkit.command.*
810
import org.mindrot.jbcrypt.BCrypt
911
import java.util.*
@@ -19,6 +21,12 @@ class DashifyCommand : CommandExecutor {
1921
val key = BCrypt.hashpw(StringUtil.generateRandomString(64), BCrypt.gensalt())
2022
ConfigHandler["key"] = key
2123
sender.sendMessage(text("Dashify key (re)generated."))
24+
sender.sendMessage(
25+
text("Click ").append(
26+
text("here", TextColor.color(0xFFCF2C)).decorate(TextDecoration.BOLD, TextDecoration.UNDERLINED)
27+
.clickEvent(ClickEvent.copyToClipboard(key))
28+
).append(text(" to copy"))
29+
)
2230
}
2331

2432
if (args[0] == "enable") {

0 commit comments

Comments
 (0)