BungeeCord/dialog
2025-06-16 07:32:05 +10:00
..
src/main/java/net/md_5/bungee/api/dialog Refactor dialog actions 2025-05-31 11:15:41 +10:00
LICENSE Minecraft 25w20a protocol support 2025-05-17 16:01:00 +10:00
nb-configuration.xml Minecraft 25w20a protocol support 2025-05-17 16:01:00 +10:00
pom.xml Release 1.21-R0.3 2025-06-16 07:32:05 +10:00
README.md Refactor dialog actions 2025-05-31 11:15:41 +10:00

BungeeCord-Dialog

Highly experimental API, subject to breakage. All contributions welcome, including major refactors/design changes.

Sample Plugin

    private class TestCommand extends Command
    {

        public TestCommand()
        {
            super( "btest" );
        }

        @Override
        public void execute(CommandSender sender, String[] args)
        {
            ProxiedPlayer player = (ProxiedPlayer) sender;

            Dialog notice = new NoticeDialog( new DialogBase( new ComponentBuilder( "Hello" ).color( ChatColor.RED ).build() ) );
            player.showDialog( notice );

            notice = new NoticeDialog(
                    new DialogBase( new ComponentBuilder( "Hello" ).color( ChatColor.RED ).build() )
                            .inputs(
                                    Arrays.asList( new TextInput( "first", new ComponentBuilder( "First" ).build() ),
                                            new TextInput( "second", new ComponentBuilder( "Second" ).build() )
                                    )
                            ) )
                    .action( new ActionButton( new ComponentBuilder( "Submit Button" ).build(), new CustomClickAction( "customform" ) ) );

            player.sendMessage( new ComponentBuilder( "click me" ).event( new ShowDialogClickEvent( notice ) ).build() );
        }
    }