From 2ddd43a86b669bae9fe4448b2695e36557899239 Mon Sep 17 00:00:00 2001 From: Jakob K Date: Mon, 28 Jun 2021 01:12:46 +0200 Subject: [PATCH] Add docs to the global col functions --- src/main/kotlin/net/axay/kspigot/chat/KSpigotChat.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/kotlin/net/axay/kspigot/chat/KSpigotChat.kt b/src/main/kotlin/net/axay/kspigot/chat/KSpigotChat.kt index 1906dedd..d5f7d3cd 100644 --- a/src/main/kotlin/net/axay/kspigot/chat/KSpigotChat.kt +++ b/src/main/kotlin/net/axay/kspigot/chat/KSpigotChat.kt @@ -74,6 +74,16 @@ fun BaseComponent.clickEvent(action: ClickEvent.Action, value: String) { clickEvent = ClickEvent(action, value) } +/** + * Creates a new [ChatColor] instance from the provided + * hex code. + * Format example: `"#4BD6CB"` + */ fun col(hex: String): ChatColor = ChatColor.of(hex) +/** + * Creates a new [ChatColor] instance from the provided + * hex code. + * Format example: `0x4BD6CB` + */ fun col(rgb: Int): ChatColor = ChatColor.of(Color(rgb))