Class DialogAnswers
java.lang.Object
com.ultikits.ultitools.ui.dialog.DialogAnswers
Validates one dialog action against the original intent.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDialogAnswers(Logger logger) Creates the answer decoder with framework logging. -
Method Summary
Modifier and TypeMethodDescriptionprivate static UiResult<?> checked(UiIntent<?> intent, ButtonRole role, @Nullable io.papermc.paper.dialog.DialogResponseView response) private static FormResponseprivate static doubleprivate static Objectoption(ChoiceInput<?> input, @Nullable String id) UiResult<?> read(UiIntent<?> intent, ButtonRole role, @Nullable io.papermc.paper.dialog.DialogResponseView response, String owner) Returns a validated answer or a player-closed result.private UiResult<?> rejected(String owner, RuntimeException failure)
-
Field Details
-
logger
-
-
Constructor Details
-
DialogAnswers
Creates the answer decoder with framework logging.
-
-
Method Details
-
read
public UiResult<?> read(UiIntent<?> intent, ButtonRole role, @Nullable @Nullable io.papermc.paper.dialog.DialogResponseView response, String owner) Returns a validated answer or a player-closed result. -
rejected
-
checked
private static UiResult<?> checked(UiIntent<?> intent, ButtonRole role, @Nullable @Nullable io.papermc.paper.dialog.DialogResponseView response) -
form
-
option
-
number
-