3d4e062901
- Removed the "retain" parameter from Windows - all Windows can now be closed and reopened - Added open handlers to Windows - Added quick build methods Window.Builder.build(Player) and Window.Builder.show(Player) - Added some NotNull annotations
17 lines
528 B
Kotlin
17 lines
528 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)) |