InvUI/invui-kotlin/src/main/kotlin/xyz/xenondevs/invui/adventure/AdventureWindowContexts.kt

17 lines
531 B
Kotlin
Raw Normal View History

2023-01-28 11:32:16 +00:00
@file:Suppress("PackageDirectoryMismatch")
package xyz.xenondevs.invui.window.type.context
2023-01-28 11:32:16 +00:00
import net.kyori.adventure.text.Component
2023-02-26 14:29:57 +00:00
import org.jetbrains.annotations.Contract
import xyz.xenondevs.inventoryaccess.component.AdventureComponentWrapper
2023-02-26 14:29:57 +00:00
import xyz.xenondevs.invui.window.Window
2023-01-28 11:32:16 +00:00
/**
* Sets the title of the window.
2023-02-26 14:29:57 +00:00
*
* @param title the new title
* @return This Window Builder
2023-01-28 11:32:16 +00:00
*/
2023-02-26 14:29:57 +00:00
@Contract("_ -> this")
fun <B : Window.Builder<*, *, B>> B.setTitle(title: Component): B = setTitle(AdventureComponentWrapper(title))