CommandAPI
CommandAPI copied to clipboard
Paper CommandAPI
This PR refactors parts of the CommandAPI so the Adventure library and Bungee library aren't used in the same .jar's anymore and Paper API and Spigot API also aren't used together anymore.
In order to do that, commandapi-bukkit-core
only serves as a tool to access NMS so it can be shared and doesn't have to be implemented again for Paper and Spigot.
The new usable platforms are commandapi-paper-(core/shade/plugin)
and commandapi-spigot-(core/shade/plugin)
.
This still requires a lot of work. I am fairly confident that these changes should already make a fairly functional CommandAPI for Paper and Spigot, however, there still is a lot of work left.
This should also invalidate #474 as this refactor puts them into different modules
TODO's:
- [ ] Potentially come up with API to make use of Paper's Brigadier API. That would include:
- No namespace handling for commands like these
- Automatic plugin association
- Probably would require changes to how commands are built or separate API that would make this easier
- [x] Update build script
- [x] Remove
PaperImplementations.java
- [x] Work through
CommandAPIBukkit
and implement inCommandAPIPaper
andCommandAPISpigot
respectively. - [x] Add Kotlin modules for Spigot and Paper (Component related arguments)
- [x] Make
commandapi-annotations
platform specific (Component related arguments) - [x] Update documentation code to include at least a platform that provides component related arguments
- [x] ~~Update tests to use
CommandAPIPaper
orCommandAPISpigot
. Maybe even both, share tests and implement component related arguments for both platforms~~ Nope, cancelling those. The original tests are still present but they won't work. After trying to port tests two times I do not really know what to do so if someone else at some point, possibly after this is merged, has an idea this could and should be implemented. - [x] Update Velocity, apparently
- [x] Deal with #406 for the Paper-specific version
- [x] Make sure the
minecraft
namespace exists for commands on Paper - [x] Documentation and changelog
- [x] Test Minecraft versions with the plugin only, shade version and non-shade version:
- [x] 1.16.5
- [x] 1.17
- [x] 1.17.1
- [x] 1.18, 1.18.1
- [x] 1.18.2
- [x] 1.19
- [x] 1.19.1, 1.19.2
- [x] 1.19.3
- [x] 1.19.4
- [x] 1.20, 1.20.1
- [x] 1.20.2
- [x] 1.20.3/4
- [x] 1.20.5/6 (On Paper, use the CommandAPI using
commandapi-paper-shade-mojang-mapped
) - [x] 1.21 (On Paper, use the CommandAPI using
commandapi-paper-shade-mojang-mapped
)