Ejemplo n.º 1
0
 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)))))))
Ejemplo n.º 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"
Ejemplo n.º 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)))))
Ejemplo n.º 4
0
 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))))
Ejemplo n.º 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))))))
Ejemplo n.º 6
0
    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"))
Ejemplo n.º 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)))))
Ejemplo n.º 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"
Ejemplo n.º 9
0
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.main_entry = "setblock"
     parsebridge.add_subcommand(
         SubCommand(ParseType.POSITION).add_subcommand(
             SubCommand(ParseType.BLOCKNAME)))
Ejemplo n.º 10
0
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.main_entry = "reload"
Ejemplo n.º 11
0
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.main_entry = "clear"
     parsebridge.add_subcommand(
         SubCommand(ParseType.SELECTOR, mode=ParseMode.OPTIONAL))
Ejemplo n.º 12
0
 def insert_parse_bridge(parsebridge: ParseBridge):
     parsebridge.main_entry = "registryinfo"
     parsebridge.add_subcommand(SubCommand(ParseType.STRING_WITHOUT_QUOTES))
Ejemplo n.º 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"
Ejemplo n.º 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))
Ejemplo n.º 15
0
 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)))))
Ejemplo n.º 16
0
 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))
Ejemplo n.º 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"
Ejemplo n.º 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)))