fix dialog flow and cleanup listeners

This commit is contained in:
jannis committed 2026-10-24 23:00:51 +02:00
1 parent d70b3b826e
commit 78a01d9654
8 files changed
+45 -24

No files matched your search

@@ -53,14 +53,14 @@ public final class Dialog {
}
public static boolean handleClick(Player player, DialogState state, Key key, CompoundBinaryTag payload) {
saveCurrentPage(state, payload);
if (key.equals(backKey)) {
state.previousPage();
showPage(player, state, null);
return false;
}
saveCurrentPage(state, payload);
Component error = validateCurrentPage(player, state);
if (error != null) {
showPage(player, state, error);
@@ -144,13 +144,13 @@ public final class Dialog {
null,
false,
false,
DialogAfterAction.CLOSE,
state.isLastPage() ? DialogAfterAction.CLOSE : DialogAfterAction.NONE,
body,
inputs
),
buttons,
null, // kein extra Exit-Button
2 // Spalten
null,
2
));
}