InvUI/invui-kotlin/src/main/kotlin/xyz/xenondevs/invui/adventure/AdventureWindowContexts.kt
NichtStudioCode f12ccf6fc8 Reformat code
2023-10-12 16:06:22 +02:00

17 lines
527 B
Kotlin

@file:Suppress("PackageDirectoryMismatch")
package xyz.xenondevs.invui.window.type.context
import net.kyori.adventure.text.Component
import org.jetbrains.annotations.Contract
import xyz.xenondevs.inventoryaccess.component.AdventureComponentWrapper
import xyz.xenondevs.invui.window.Window
/**
* Sets the title of the window.
*
* @param title the new title
* @return This Window Builder
*/
@Contract("_ -> this")
fun <B : Window.Builder<*, B>> B.setTitle(title: Component): B = setTitle(AdventureComponentWrapper(title))