Update dialog javadoc and example
This commit is contained in:
parent
89e66ed648
commit
bec329352d
@ -23,12 +23,15 @@ Sample Plugin
|
|||||||
Dialog notice = new NoticeDialog( new DialogBase( new ComponentBuilder( "Hello" ).color( ChatColor.RED ).build() ) );
|
Dialog notice = new NoticeDialog( new DialogBase( new ComponentBuilder( "Hello" ).color( ChatColor.RED ).build() ) );
|
||||||
player.showDialog( notice );
|
player.showDialog( notice );
|
||||||
|
|
||||||
notice = new SimpleInputFormDialog(
|
notice = new NoticeDialog(
|
||||||
new DialogBase( new ComponentBuilder( "Hello" ).color( ChatColor.RED ).build() ),
|
new DialogBase( new ComponentBuilder( "Hello" ).color( ChatColor.RED ).build() )
|
||||||
new DialogSubmitAction( "submit", new CustomFormSubmission( "customform" ), new ComponentBuilder( "Submit Button" ).build() ),
|
.inputs(
|
||||||
new TextInput( "first", new ComponentBuilder( "First" ).build() ),
|
Arrays.asList( new TextInput( "first", new ComponentBuilder( "First" ).build() ),
|
||||||
new TextInput( "second", new ComponentBuilder( "Second" ).build() )
|
new TextInput( "second", new ComponentBuilder( "Second" ).build() )
|
||||||
);
|
)
|
||||||
|
) )
|
||||||
|
.action( new DynamicAction( new ComponentBuilder( "Submit Button" ).build(), new Custom( "customform" ) ) );
|
||||||
|
|
||||||
player.sendMessage( new ComponentBuilder( "click me" ).event( new ShowDialogClickEvent( notice ) ).build() );
|
player.sendMessage( new ComponentBuilder( "click me" ).event( new ShowDialogClickEvent( notice ) ).build() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,9 +21,6 @@ public class RunCommand extends DynamicType
|
|||||||
* The template to be applied, where variables of the form
|
* The template to be applied, where variables of the form
|
||||||
* <code>$(key)</code> will be replaced by their
|
* <code>$(key)</code> will be replaced by their
|
||||||
* {@link net.md_5.bungee.api.dialog.input.DialogInput#key} value.
|
* {@link net.md_5.bungee.api.dialog.input.DialogInput#key} value.
|
||||||
* <br>
|
|
||||||
* The <code>action</code> key is special and will be replaced with the
|
|
||||||
* {@link net.md_5.bungee.api.dialog.action.DialogSubmitAction#id}.
|
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
private String template;
|
private String template;
|
||||||
|
Loading…
Reference in New Issue
Block a user