def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.main_entry = "clone"
     parsebridge.add_subcommand(SubCommand(ParseType.POSITION).add_subcommand(SubCommand(
         ParseType.POSITION).add_subcommand(SubCommand(ParseType.POSITION).add_subcommand(
             SubCommand(ParseType.STRING_WITHOUT_QUOTES, mode=ParseMode.OPTIONAL).add_subcommand(
                 SubCommand(ParseType.STRING_WITHOUT_QUOTES, mode=ParseMode.OPTIONAL).add_subcommand(
                     SubCommand(ParseType.BLOCKNAME, mode=ParseMode.OPTIONAL)))))))
Exemple #2
0
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.add_subcommand(
         SubCommand(ParseType.SELECT_DEFINITED_STRING, "0", "1", "2", "3",
                    "survival", "creative", "hardcore",
                    "spectator").add_subcommand(
                        SubCommand(ParseType.SELECTOR,
                                   mode=ParseMode.OPTIONAL)))
     parsebridge.main_entry = "gamemode"
Exemple #3
0
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.main_entry = "fill"
     parsebridge.add_subcommand(
         SubCommand(ParseType.POSITION).add_subcommand(
             SubCommand(ParseType.POSITION).add_subcommand(
                 SubCommand(ParseType.BLOCKNAME).add_subcommand(
                     SubCommand(ParseType.DEFINIED_STRING,
                                mode=ParseMode.OPTIONAL).add_subcommand(
                                    ParseType.BLOCKNAME)))))
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.main_entry = "iteminfo"
     parsebridge.add_subcommand(SubCommand(ParseType.DEFINIED_STRING, "hand"))
     parsebridge.add_subcommand(SubCommand(ParseType.DEFINIED_STRING, "inventory"))
     parsebridge.add_subcommand(SubCommand(ParseType.DEFINIED_STRING, "item").add_subcommand(SubCommand(
         ParseType.ITEMNAME)))
     parsebridge.add_subcommand(SubCommand(ParseType.DEFINIED_STRING, "block").add_subcommand(
         SubCommand(ParseType.DEFINIED_STRING, "inventory").add_subcommand(SubCommand(ParseType.POSITION))))
Exemple #5
0
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.main_entry = "replaceitem"
     parsebridge.add_subcommand(
         SubCommand(ParseType.DEFINIED_STRING, "block").add_subcommand(
             SubCommand(ParseType.POSITION).add_subcommand(
                 SubCommand(ParseType.INT).add_subcommand(
                     SubCommand(ParseType.ITEMNAME).add_subcommand(
                         SubCommand(ParseType.INT,
                                    mode=ParseMode.OPTIONAL))))))
     parsebridge.add_subcommand(
         SubCommand(ParseType.DEFINIED_STRING, "entity").add_subcommand(
             SubCommand(ParseType.SELECTOR).add_subcommand(
                 SubCommand(ParseType.INT).add_subcommand(
                     SubCommand(ParseType.ITEMNAME).add_subcommand(
                         SubCommand(ParseType.INT,
                                    mode=ParseMode.OPTIONAL))))))
    def insert_parse_bridge(parsebridge: ParseBridge):
        parsebridge.main_entry = "datapack"
        parsebridge.add_subcommand(
            SubCommand(ParseType.DEFINIED_STRING, "enable").add_subcommand(
                SubCommand(ParseType.STRING_WITHOUT_QUOTES)))
        parsebridge.add_subcommand(
            SubCommand(ParseType.DEFINIED_STRING, "disable").add_subcommand(
                SubCommand(ParseType.STRING_WITHOUT_QUOTES)))
        parsebridge.add_subcommand(
            SubCommand(ParseType.DEFINIED_STRING, "list"))

        parsebridge.add_subcommand(
            SubCommand(ParseType.DEFINIED_STRING, "release"))
Exemple #7
0
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.main_entry = ["xp", "experience"]
     parsebridge.add_subcommand(
         SubCommand(ParseType.DEFINIED_STRING, "add").add_subcommand(
             SubCommand(ParseType.SELECTOR).add_subcommand(
                 SubCommand(ParseType.INT).add_subcommand(
                     SubCommand(ParseType.DEFINIED_STRING,
                                "points",
                                mode=ParseMode.OPTIONAL)).add_subcommand(
                                    SubCommand(ParseType.DEFINIED_STRING,
                                               "levels",
                                               mode=ParseMode.OPTIONAL))))
     ).add_subcommand(
         SubCommand(ParseType.DEFINIED_STRING, "set").add_subcommand(
             SubCommand(ParseType.SELECTOR).add_subcommand(
                 SubCommand(ParseType.INT).add_subcommand(
                     SubCommand(ParseType.DEFINIED_STRING,
                                "points",
                                mode=ParseMode.OPTIONAL)).add_subcommand(
                                    SubCommand(ParseType.DEFINIED_STRING,
                                               "levels",
                                               mode=ParseMode.OPTIONAL)))))
Exemple #8
0
 def insert_parse_bridge(parsebridge: ParseBridge):
     # missing: align, anchored, facing, in
     execute_as = SubCommand(ParseType.DEFINIED_STRING,
                             "as",
                             mode=ParseMode.OPTIONAL).add_subcommand(
                                 SubCommand(ParseType.SELECTOR))
     execute_at = SubCommand(ParseType.DEFINIED_STRING,
                             "at",
                             mode=ParseMode.OPTIONAL).add_subcommand(
                                 SubCommand(ParseType.POSITION))
     # missing: blocks, data, score
     execute_if = SubCommand(
         ParseType.DEFINIED_STRING, "if",
         mode=ParseMode.OPTIONAL).add_subcommand(
             SubCommand(ParseType.DEFINIED_STRING, "block").add_subcommand(
                 SubCommand(ParseType.POSITION).add_subcommand(
                     ParseType.BLOCKNAME))).add_subcommand(
                         SubCommand(ParseType.DEFINIED_STRING,
                                    "entity").add_subcommand(
                                        SubCommand(ParseType.SELECTOR)))
     execute_run = SubCommand(ParseType.DEFINIED_STRING,
                              "run",
                              mode=ParseMode.OPTIONAL).add_subcommand(
                                  SubCommand(
                                      ParseType.OPEN_END_UNDEFINITED_STRING,
                                      min=1))
     execute_unless = SubCommand(ParseType.DEFINIED_STRING,
                                 "unless",
                                 mode=ParseMode.OPTIONAL)
     execute_unless.sub_commands = execute_if.sub_commands
     sub_commands = [execute_as, execute_at, execute_if, execute_run]
     sub_commands_ends = [
         execute_as.sub_commands[0], execute_at.sub_commands[0],
         execute_if.sub_commands[0].sub_commands[0].sub_commands[0],
         execute_if.sub_commands[1].sub_commands[0],
         execute_unless.sub_commands[0].sub_commands[0].sub_commands[0],
         execute_unless.sub_commands[1].sub_commands[0]
     ]
     for subcommand in sub_commands_ends + [
             parsebridge
     ]:  # every end can be assinged with an new
         subcommand.sub_commands = sub_commands
     parsebridge.main_entry = "execute"
Exemple #9
0
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.main_entry = "setblock"
     parsebridge.add_subcommand(
         SubCommand(ParseType.POSITION).add_subcommand(
             SubCommand(ParseType.BLOCKNAME)))
Exemple #10
0
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.main_entry = "reload"
Exemple #11
0
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.main_entry = "clear"
     parsebridge.add_subcommand(
         SubCommand(ParseType.SELECTOR, mode=ParseMode.OPTIONAL))
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.main_entry = "registryinfo"
     parsebridge.add_subcommand(SubCommand(ParseType.STRING_WITHOUT_QUOTES))
Exemple #13
0
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.add_subcommand(
         SubCommand(ParseType.STRING_WITHOUT_QUOTES).add_subcommand(
             SubCommand(ParseType.STRING_WITHOUT_QUOTES,
                        mode=ParseMode.OPTIONAL)))
     parsebridge.main_entry = "gamerule"
Exemple #14
0
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.main_entry = ["help", "?"]
     parsebridge.add_subcommand(
         SubCommand(ParseType.INT, mode=ParseMode.OPTIONAL)).add_subcommand(
             SubCommand(ParseType.STRING, mode=ParseMode.OPTIONAL))
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.main_entry = "generate"
     parsebridge.add_subcommand(SubCommand(ParseType.INT, mode=ParseMode.OPTIONAL).add_subcommand(
         SubCommand(ParseType.INT).add_subcommand(SubCommand(ParseType.INT, mode=ParseMode.OPTIONAL).add_subcommand(
                                                  SubCommand(ParseType.INT)))))
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.main_entry = ["tp", "teleport"]  # both are valid
     parsebridge.add_subcommand(SubCommand(ParseType.SELECTOR).add_subcommand(SubCommand(ParseType.SELECTOR)).
                                add_subcommand(SubCommand(ParseType.POSITION))).\
         add_subcommand(SubCommand(ParseType.POSITION))
Exemple #17
0
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.add_subcommand(
         SubCommand(ParseType.SELECTOR).add_subcommand(
             SubCommand(ParseType.ITEMNAME).add_subcommand(
                 SubCommand(ParseType.INT, mode=ParseMode.OPTIONAL))))
     parsebridge.main_entry = "give"
Exemple #18
0
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.main_entry = ["tell", "msg", "w"]
     parsebridge.add_subcommand(
         SubCommand(ParseType.SELECTOR).add_subcommand(
             SubCommand(ParseType.OPEN_END_UNDEFINITED_STRING)))