PyMine-Server icon indicating copy to clipboard operation
PyMine-Server copied to clipboard

Shell Rewrite + Better Commands + Command Argument Parsing

Open Sh-wayz opened this issue 3 years ago • 0 comments

Shell Rewrite

Shell Features

  • [x] If debug_mode is enabled in the server.yml, not recognized commands should be evaluated as python.
  • [x] Maybe an option for custom shell prompts to get rid of the boring >. you can also use colors!
  • [x] The shell should also handle the up arrow correctly like any sane shell.
  • [x] Fix all arrow-key handling.
  • [x] vi_mode.
  • [x] save history to file.

Command / Command Parsing Features

Note: For more information on commands, see here: https://wiki.vg/Command_Data

  • [ ] Aliases for commands.
  • [x] A help command which can grab the docstring of commands added by plugins.
    • [ ] It should also display the args for the command(and type if the command has typehinting)
  • [ ] A send() coroutine passed to the command which handles responding to the respective player and/or the console.
  • [ ] A proper object model instead of a uuid passed to the command.
  • [x] Parser which parses different types for commands, based on the typehints/annotations from func.__annotations__
  • [x] Add ability to add custom parsers.
  • [ ] Support most parsers in the below checklist.
  • [x] Parsers should be structured into classes for ease of use.
  • [ ] Optional: syntax highlighting.

Vanilla Parsers

Note: Not all of these need to be implemented

  • [x] brigadier:bool
  • [x] brigadier:double
  • [x] brigadier:float
  • [x] brigadier:integer
  • [x] brigadier:string
  • [ ] minecraft:entity
  • [ ] minecraft:game_profile
  • [ ] minecraft:block_pos
  • [ ] minecraft:column_pos
  • [ ] minecraft:vec3
  • [ ] minecraft:vec2
  • [ ] minecraft:block_state
  • [ ] minecraft:block_predicate
  • [ ] minecraft:item_stack
  • [ ] minecraft:item_predicate
  • [ ] minecraft:color
  • [ ] minecraft:component
  • [ ] minecraft:message
  • [ ] minecraft:nbt
  • [ ] minecraft:nbt_path
  • [ ] minecraft:objective
  • [ ] minecraft:objective_criteria
  • [ ] minecraft:operation
  • [ ] minecraft:particle
  • [ ] minecraft:rotation
  • [ ] minecraft:angle
  • [ ] minecraft:scoreboard_slot
  • [ ] minecraft:score_holder
  • [ ] minecraft:swizzle
  • [ ] minecraft:team
  • [ ] minecraft:item_slot
  • [ ] minecraft:resource_location
  • [ ] minecraft:mob_effect
  • [ ] minecraft:function
  • [ ] minecraft:entity_anchor
  • [ ] minecraft:range
  • [ ] minecraft:int_range
  • [ ] minecraft:float_range
  • [ ] minecraft:item_enchantment
  • [ ] minecraft:entity_summon
  • [ ] minecraft:dimension
  • [x] minecraft:uuid
  • [ ] minecraft:nbt_tag
  • [ ] minecraft:nbt_compound_tag
  • [ ] minecraft:time

Sh-wayz avatar Feb 13 '21 16:02 Sh-wayz