File tree Expand file tree Collapse file tree
src/main/kotlin/io/dashify/plugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ package io.dashify.plugin
33import io.dashify.plugin.util.ConfigHandler
44import io.dashify.plugin.util.StringUtil
55import net.kyori.adventure.text.Component.text
6+ import net.kyori.adventure.text.event.ClickEvent
67import net.kyori.adventure.text.format.TextColor
8+ import net.kyori.adventure.text.format.TextDecoration
79import org.bukkit.command.*
810import org.mindrot.jbcrypt.BCrypt
911import 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" ) {
You can’t perform that action at this time.
0 commit comments