EdenCommands icon

EdenCommands -----

A command library to register Commands in a tree-style fashion.



Code (Java):
class MyClass {
    public MyClass ( ) {
        //creating a command node
        CommandNode node = LiteralCommandNode. literal ( "mycommand" ) ;
        node. executes (context -> { } ) ;
        node. withPermission ( "myplugin.mycommand" ) ;
       
        //adding a subcommand -> /mycommand subcommand
        node. then (LiteralCommandNode. literal ( "subcommand" ) ) ;
       
        //register it
        CommandRegistry. register (node ) ;
    }
}
Code (Java):
class MyClass {
    public MyClass ( ) {
        CommandNode node = LiteralCommandNode. literal ( "mycommand" ) ;
        CommandNode argument = ArgumentCommandNode ( "key", IntegerArgumentParser. intParser ( 0, 10 ) ) ;
        argument. executes (context -> {
            int number = context. getParameter ( "key", Integer. class ) ;
            context. getSender ( ). sendMessage (number ) ;
        } ) ;
        node. then (argument ) ;
    }
}
Resource Information
Author:
----------
Total Downloads: 69
First Release: Jan 6, 2022
Last Update: Jan 6, 2022
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings