feather-rs / feather

A Minecraft server implementation in Rust
Apache License 2.0
2.58k stars 143 forks source link

Commands #487

Open Iaiao opened 2 years ago

Iaiao commented 2 years ago

Commands

Status

Description

This PR adds commands. I've started working on this with lieutenant, but I did't like regex because it's hard to write regexps for something like @e[advancements={"adv":{criteria:"true"}}], it required some refactoring to make compatible structure for Declare Commands packet, CommandCtx: Send + Sync wouldn't allow LifetimelessMut<Game> and has no concept of tab completion, so I decided to make my own dispatcher instead of rewriting 95% of the existing code.

Things to do:

Things to discuss

Related issues

Checklist

Note: if you locally don't get any errors, but GitHub Actions fails (especially at clippy) you might want to check your rust toolchain version. You can then feel free to fix these warnings/errors in your PR.