File tree Expand file tree Collapse file tree 8 files changed +57
-1
lines changed
dialog/src/main/java/net/md_5/bungee/api/dialog Expand file tree Collapse file tree 8 files changed +57
-1
lines changed Original file line number Diff line number Diff line change 4
4
import lombok .Data ;
5
5
import net .md_5 .bungee .api .chat .BaseComponent ;
6
6
7
+ /**
8
+ * Represents a dialog action which will usually appear as a button.
9
+ */
7
10
@ Data
8
11
@ AllArgsConstructor
9
12
public class DialogAction
10
13
{
11
14
15
+ /**
16
+ * The text label of the button, mandatory.
17
+ */
12
18
private BaseComponent label ;
19
+ /**
20
+ * The hover tooltip of the button.
21
+ */
13
22
private BaseComponent tooltip ;
23
+ /**
24
+ * The width of the button (default: 150).
25
+ */
14
26
private int width ;
15
27
16
28
public DialogAction (BaseComponent label )
Original file line number Diff line number Diff line change 8
8
import net .md_5 .bungee .api .chat .BaseComponent ;
9
9
import net .md_5 .bungee .api .chat .ClickEvent ;
10
10
11
+ /**
12
+ * Represents a button which may be clicked.
13
+ */
11
14
@ Data
12
15
@ Accessors (fluent = true )
13
16
@ ToString (callSuper = true )
14
17
@ EqualsAndHashCode (callSuper = true )
15
18
public class DialogClickAction extends DialogAction
16
19
{
17
20
21
+ /**
22
+ * The optional action to take on click.
23
+ */
18
24
@ SerializedName ("on_click" )
19
25
private ClickEvent onClick ;
20
26
Original file line number Diff line number Diff line change 8
8
import net .md_5 .bungee .api .chat .BaseComponent ;
9
9
import net .md_5 .bungee .api .dialog .submit .DialogSubmission ;
10
10
11
+ /**
12
+ * Represents a dialog button associated with the submission of a form dialog
13
+ * containing inputs.
14
+ */
11
15
@ Data
12
16
@ Accessors (fluent = true )
13
17
@ ToString (callSuper = true )
14
18
@ EqualsAndHashCode (callSuper = true )
15
19
public class DialogSubmitAction extends DialogAction
16
20
{
17
21
22
+ /**
23
+ * The ID of the button, used to distinguish submissions initiated via
24
+ * different buttons on the dialog.
25
+ */
18
26
private String id ;
27
+ /**
28
+ * The submission action to take.
29
+ */
19
30
@ SerializedName ("on_submit" )
20
31
private DialogSubmission onSubmit ;
21
32
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Contains the different actions/buttons for a {@link net.md_5.bungee.api.dialog.Dialog}.
3
+ */
4
+ package net .md_5 .bungee .api .dialog .action ;
Original file line number Diff line number Diff line change 1
1
package net .md_5 .bungee .api .dialog .body ;
2
2
3
3
import lombok .Data ;
4
+ import org .jetbrains .annotations .ApiStatus ;
4
5
6
+ /**
7
+ * Represents the body content of a {@link net.md_5.bungee.api.dialog.Dialog}.
8
+ */
5
9
@ Data
6
10
public abstract class DialogBody
7
11
{
8
12
13
+ /**
14
+ * The internal body type.
15
+ */
16
+ @ ApiStatus .Internal
9
17
private final String type ;
10
18
}
Original file line number Diff line number Diff line change 5
5
import lombok .ToString ;
6
6
import net .md_5 .bungee .api .chat .BaseComponent ;
7
7
8
+ /**
9
+ * Represents a dialog body which consists of text constrained to a certain
10
+ * width.
11
+ */
8
12
@ Data
9
13
@ ToString (callSuper = true )
10
14
@ EqualsAndHashCode (callSuper = true )
11
15
public class PlainMessageBody extends DialogBody
12
16
{
13
17
18
+ /**
19
+ * The text body.
20
+ */
14
21
private BaseComponent contents ;
22
+ /**
23
+ * The maximum width (default: 200).
24
+ */
15
25
private int width ;
16
26
17
27
public PlainMessageBody (BaseComponent contents )
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Contains the different {@link net.md_5.bungee.api.dialog.Dialog} body content
3
+ * types.
4
+ */
5
+ package net .md_5 .bungee .api .dialog .body ;
Original file line number Diff line number Diff line change 1
1
/**
2
- * Contains the core classes for the display of a {@link Dialog}.
2
+ * Contains the core classes for the display of a {@link net.md_5.bungee.api.dialog. Dialog}.
3
3
*/
4
4
package net .md_5 .bungee .api .dialog ;
You can’t perform that action at this time.
0 commit comments