Class SpigotDialogActionBuilder
java.lang.Object
io.github.projectunified.unidialog.spigot.action.SpigotDialogActionBuilder
- All Implemented Interfaces:
DialogActionBuilder<SpigotDialog<?>,
SpigotDialogActionBuilder>
public class SpigotDialogActionBuilder
extends Object
implements DialogActionBuilder<SpigotDialog<?>,SpigotDialogActionBuilder>
-
Field Summary
Fields inherited from interface io.github.projectunified.unidialog.core.action.DialogActionBuilder
DEFAULT_WIDTH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopyToClipboard
(String value) Set the action to be a copy-to-clipboard actiondynamicCustom
(String id) Set the action to be a dynamic custom actiondynamicCustom
(String namespace, String id) Set the action to be a dynamic custom action with a namespacedynamicRunCommand
(String template) Set the action to be a dynamic run command actionnet.md_5.bungee.api.dialog.action.ActionButton
Set the label for the dialog actionlabel
(net.md_5.bungee.api.chat.BaseComponent label) Set the label for the dialog actionSet the action to be an open-URL actionrunCommand
(String command) Set the action to be a run command actionshowDialog
(DialogOpener dialogOpener) Set the action to be a show dialog actionshowDialog
(SpigotDialog<?> dialog) Set the action to be a show dialog actionshowDialog
(String namespace, String dialogId) Set the action to be a show dialog actionsuggestCommand
(String command) Set the action to be a suggest command actionSet the tooltip for the dialog actiontooltip
(@Nullable net.md_5.bungee.api.chat.BaseComponent tooltip) Set the tooltip for the dialog actionwidth
(int width) Set the width for the dialog action
-
Constructor Details
-
SpigotDialogActionBuilder
-
-
Method Details
-
label
Set the label for the dialog action- Parameters:
label
- the label to set- Returns:
- the current instance of the builder for method chaining
-
label
Description copied from interface:DialogActionBuilder
Set the label for the dialog action- Specified by:
label
in interfaceDialogActionBuilder<SpigotDialog<?>,
SpigotDialogActionBuilder> - Parameters:
label
- the label to set- Returns:
- the current instance of the builder for method chaining
-
tooltip
public SpigotDialogActionBuilder tooltip(@Nullable @Nullable net.md_5.bungee.api.chat.BaseComponent tooltip) Set the tooltip for the dialog action- Parameters:
tooltip
- the tooltip to set, can be null- Returns:
- the current instance of the builder for method chaining
-
tooltip
Description copied from interface:DialogActionBuilder
Set the tooltip for the dialog action- Specified by:
tooltip
in interfaceDialogActionBuilder<SpigotDialog<?>,
SpigotDialogActionBuilder> - Parameters:
tooltip
- the tooltip to set, can be null- Returns:
- the current instance of the builder for method chaining
-
width
Description copied from interface:DialogActionBuilder
Set the width for the dialog action- Specified by:
width
in interfaceDialogActionBuilder<SpigotDialog<?>,
SpigotDialogActionBuilder> - Parameters:
width
- the width to set- Returns:
- the current instance of the builder for method chaining
-
copyToClipboard
Description copied from interface:DialogActionBuilder
Set the action to be a copy-to-clipboard action- Specified by:
copyToClipboard
in interfaceDialogActionBuilder<SpigotDialog<?>,
SpigotDialogActionBuilder> - Parameters:
value
- the value to copy to the clipboard- Returns:
- the current instance of the builder for method chaining
-
dynamicCustom
Description copied from interface:DialogActionBuilder
Set the action to be a dynamic custom action- Specified by:
dynamicCustom
in interfaceDialogActionBuilder<SpigotDialog<?>,
SpigotDialogActionBuilder> - Parameters:
id
- the identifier for the dynamic custom action- Returns:
- the current instance of the builder for method chaining
-
dynamicCustom
Description copied from interface:DialogActionBuilder
Set the action to be a dynamic custom action with a namespace- Specified by:
dynamicCustom
in interfaceDialogActionBuilder<SpigotDialog<?>,
SpigotDialogActionBuilder> - Parameters:
namespace
- the namespace for the dynamic custom actionid
- the identifier for the dynamic custom action- Returns:
- the current instance of the builder for method chaining
-
dynamicRunCommand
Description copied from interface:DialogActionBuilder
Set the action to be a dynamic run command action- Specified by:
dynamicRunCommand
in interfaceDialogActionBuilder<SpigotDialog<?>,
SpigotDialogActionBuilder> - Parameters:
template
- the command template to run- Returns:
- the current instance of the builder for method chaining
-
openUrl
Description copied from interface:DialogActionBuilder
Set the action to be an open-URL action- Specified by:
openUrl
in interfaceDialogActionBuilder<SpigotDialog<?>,
SpigotDialogActionBuilder> - Parameters:
url
- the URL to open- Returns:
- the current instance of the builder for method chaining
-
runCommand
Description copied from interface:DialogActionBuilder
Set the action to be a run command action- Specified by:
runCommand
in interfaceDialogActionBuilder<SpigotDialog<?>,
SpigotDialogActionBuilder> - Parameters:
command
- the command to run- Returns:
- the current instance of the builder for method chaining
-
suggestCommand
Description copied from interface:DialogActionBuilder
Set the action to be a suggest command action- Specified by:
suggestCommand
in interfaceDialogActionBuilder<SpigotDialog<?>,
SpigotDialogActionBuilder> - Parameters:
command
- the command to suggest- Returns:
- the current instance of the builder for method chaining
-
showDialog
Description copied from interface:DialogActionBuilder
Set the action to be a show dialog action- Specified by:
showDialog
in interfaceDialogActionBuilder<SpigotDialog<?>,
SpigotDialogActionBuilder> - Parameters:
dialog
- the dialog to show- Returns:
- the current instance of the builder for method chaining
-
showDialog
Description copied from interface:DialogActionBuilder
Set the action to be a show dialog action- Specified by:
showDialog
in interfaceDialogActionBuilder<SpigotDialog<?>,
SpigotDialogActionBuilder> - Parameters:
namespace
- the namespace of the dialogdialogId
- the identifier of the dialog to show- Returns:
- the current instance of the builder for method chaining
-
showDialog
Description copied from interface:DialogActionBuilder
Set the action to be a show dialog action- Specified by:
showDialog
in interfaceDialogActionBuilder<SpigotDialog<?>,
SpigotDialogActionBuilder> - Parameters:
dialogOpener
- the dialog opener to use for showing the dialog- Returns:
- the current instance of the builder for method chaining
-
getAction
public net.md_5.bungee.api.dialog.action.ActionButton getAction()
-