feat: add Brigadier support to Paper#427
Conversation
This commit turned out a bit bigger than I would've wanted. Here is a list of changes: - added the Brigadier dependency to common - moved Brigadier command creation to common (used fabric as a template) - replaced the individual fabric/forge/neoforge Brigadier command implementations with the common impl - split ChunkyBukkit into AbstractChunkyBukkit for common logic, ChunkyBukkit for Spigot only, and ChunkyPaper for Paper only - added Paper Brigadier command implementation for the Paper plugin - added paper-plugin.yml to support this change
common/src/main/java/org/popcraft/chunky/command/suggestion/PatternSuggestionProvider.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/popcraft/chunky/command/suggestion/ShapeSuggestionProvider.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/popcraft/chunky/command/suggestion/SuggestionProviders.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/popcraft/chunky/command/suggestion/TrimModeSuggestionProvider.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/popcraft/chunky/command/brigadier/BrigadierChunkyCommand.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/popcraft/chunky/command/brigadier/BrigadierChunkyCommand.java
Outdated
Show resolved
Hide resolved
| name: ${name} | ||
| version: ${version} | ||
| main: ${group}.chunky.ChunkyBukkit | ||
| api-version: 1.21 |
There was a problem hiding this comment.
| api-version: 1.21 | |
| api-version: 1.21.1 |
There was a problem hiding this comment.
I am like 99% certain that version does not exist. api-version: 1.21 had something weird going on where it only started accepting "minor" version from like .5.
Or I am mistaking it for 1.20, in which case please call me out.
There was a problem hiding this comment.
The minor version being usable in the api-version was added in 1.20.5
There was a problem hiding this comment.
Okay, good to know, I was convinced it was 1.21. Too many versions 😂
| } | ||
| } | ||
|
|
||
| public Chunky getChunky() { |
There was a problem hiding this comment.
What's the purpose of shifting some methods and fields around in the ChunkyBukkit/BukkitPlayer/BukkitWorld classes? It seems to only create extra diff and confuse the git blame for the future
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
re-add the newline at the end of file to reduce diff
This PR does a few things:
In order to achieve this, it split the Bukkit plugin main class into two classes, each with their accompanying (paper-)plugin.yml and own command handling.