| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Regards Paper 1.20.6, build 65+, they've merged the Brigadier command API and removed the vanillaCommandDispatcher field.
+ fixed exception appearing in server log, this isn't done with VarHandles but I think because this is a hotfix, it is fine for now. I will handle all this properly on dev/commandapi-paper and #517
|
I gave this PR a quick spin with my plugin and it seems to work without any issues |
Sorry, something went wrong.
| private static final Field commandDispatcher; | ||
|
|
||
| static { | ||
| Field temporary; | ||
| try { | ||
| temporary = MinecraftServer.class.getDeclaredField("vanillaCommandDispatcher"); | ||
| } catch (Exception e) { | ||
| temporary = null; | ||
| } | ||
| commandDispatcher = temporary; | ||
| } |
There was a problem hiding this comment.
A field that could be null that doesn't have @Nullable or wrapped in an Optional! 🫢
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Some of this is not pretty but doing this the VarHandle-less way also got rid of the exception in the console which I didn't seem to do with VarHandles.
Nevertheless, this should make it possible to at least register commands using Paper 1.20.6 build 65 and onwards.
I plan to handle all this properly in #517