Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper command argument parsing #256

Closed
6 of 47 tasks
Iapetus-11 opened this issue Feb 2, 2021 · 1 comment
Closed
6 of 47 tasks

Proper command argument parsing #256

Iapetus-11 opened this issue Feb 2, 2021 · 1 comment
Assignees
Labels
Enhancement New feature, request, or thing

Comments

@Iapetus-11
Copy link
Member

Iapetus-11 commented Feb 2, 2021

Features

  • Add parser which parses different types for commands, based on the typehints/annotations from func.__annotations__
  • Add ability to add custom parsers
  • This should support all parsers in the below checklist
  • Parsers should be structured into classes for ease of use
  • For more information on commands, see here: https://wiki.vg/Command_Data

Reason

  • Needed for PlayDeclareCommands (which is part of the join sequence)
  • Makes making commands easier

Check List

  • AbstractParser class to base parser structure off of
  • Actually utilize type annotations and parsers in the command code

Parsers

  • brigadier:bool
  • brigadier:double
  • brigadier:float
  • brigadier:integer
  • 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
  • minecraft:uuid
  • minecraft:nbt_tag
  • minecraft:nbt_compound_tag
  • minecraft:time
@Iapetus-11 Iapetus-11 added the Enhancement New feature, request, or thing label Feb 2, 2021
@Iapetus-11 Iapetus-11 self-assigned this Feb 9, 2021
@Iapetus-11
Copy link
Member Author

Merging this issue into #266

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature, request, or thing
Projects
None yet
Development

No branches or pull requests

1 participant