Add docs to the global col functions

This commit is contained in:
Jakob K
2021-06-28 01:12:46 +02:00
parent a80e3c97ee
commit 2ddd43a86b

View File

@@ -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))