Skip to content

Commit b2c824c

Browse files
committed
feat: enhance noticeDialog to include title parameter
1 parent e3c7ba5 commit b2c824c

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

surf-api-bukkit/surf-api-bukkit-api/api/surf-api-bukkit-api.api

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,10 +1021,10 @@ public final class dev/slne/surf/surfapi/bukkit/api/command/args/MiniMessageArgu
10211021

10221022
public final class dev/slne/surf/surfapi/bukkit/api/dialog/CommonDialogsKt {
10231023
public static final fun noticeDialog (Lkotlin/jvm/functions/Function1;)Lio/papermc/paper/dialog/Dialog;
1024-
public static final fun noticeDialog (Lnet/kyori/adventure/text/Component;Ljava/lang/Integer;)Lio/papermc/paper/dialog/Dialog;
1025-
public static synthetic fun noticeDialog$default (Lnet/kyori/adventure/text/Component;Ljava/lang/Integer;ILjava/lang/Object;)Lio/papermc/paper/dialog/Dialog;
1026-
public static final fun noticeDialogWithBuilder (Ljava/lang/Integer;Lkotlin/jvm/functions/Function1;)Lio/papermc/paper/dialog/Dialog;
1027-
public static synthetic fun noticeDialogWithBuilder$default (Ljava/lang/Integer;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lio/papermc/paper/dialog/Dialog;
1024+
public static final fun noticeDialog (Lnet/kyori/adventure/text/Component;Lnet/kyori/adventure/text/Component;Ljava/lang/Integer;)Lio/papermc/paper/dialog/Dialog;
1025+
public static synthetic fun noticeDialog$default (Lnet/kyori/adventure/text/Component;Lnet/kyori/adventure/text/Component;Ljava/lang/Integer;ILjava/lang/Object;)Lio/papermc/paper/dialog/Dialog;
1026+
public static final fun noticeDialogWithBuilder (Ljava/lang/Integer;Lnet/kyori/adventure/text/Component;Lkotlin/jvm/functions/Function1;)Lio/papermc/paper/dialog/Dialog;
1027+
public static synthetic fun noticeDialogWithBuilder$default (Ljava/lang/Integer;Lnet/kyori/adventure/text/Component;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lio/papermc/paper/dialog/Dialog;
10281028
}
10291029

10301030
public final class dev/slne/surf/surfapi/bukkit/api/dialog/DialogBuilderKt {

surf-api-bukkit/surf-api-bukkit-api/src/main/kotlin/dev/slne/surf/surfapi/bukkit/api/dialog/CommonDialogs.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ fun noticeDialog(builder: DialogRegistryEntry.Builder.() -> Unit) = dialog {
1212
type { notice() }
1313
}
1414

15-
fun noticeDialog(notice: Component, width: @Range(from = 1, to = 1024) Int? = null) = noticeDialog {
15+
fun noticeDialog(title: Component, notice: Component, width: @Range(from = 1, to = 1024) Int? = null) = noticeDialog {
1616
base {
17+
title(title)
1718
body {
1819
plainMessage(notice, width)
1920
}
@@ -22,5 +23,6 @@ fun noticeDialog(notice: Component, width: @Range(from = 1, to = 1024) Int? = nu
2223

2324
fun noticeDialogWithBuilder(
2425
width: @Range(from = 1, to = 1024) Int? = null,
26+
title: Component,
2527
notice: SurfComponentBuilder.() -> Unit,
26-
) = noticeDialog(SurfComponentBuilder(notice), width)
28+
) = noticeDialog(title, SurfComponentBuilder(notice), width)

0 commit comments

Comments
 (0)