JorelAli / CommandAPI

A Bukkit/Spigot API for the command UI introduced in Minecraft 1.13
https://commandapi.jorel.dev
MIT License
504 stars 60 forks source link

`java.lang.NoSuchFieldError: Class net.minecraft.server.MinecraftServer does not have member field 'net.minecraft.commands.Commands vanillaCommandDispatcher'` after upgrading to Paper-1.20.6-b68 #554

Closed globau closed 1 month ago

globau commented 2 months ago

CommandAPI version

9.4.0

Minecraft version

1.20.6

Are you shading the CommandAPI?

Yes

What I did

What actually happened

All plugins using CommaAPI fail to load

What should have happened

Business as usual

Server logs and CommandAPI config

java.lang.NoSuchFieldError: Class net.minecraft.server.MinecraftServer does not have member field 'net.minecraft.commands.Commands vanillaCommandDispatcher'
        at ClodMC.jar/shadow.dev.jorel.commandapi.nms.NMS_Common.getBrigadierDispatcher(NMS_Common.java:353) ~[ClodMC.jar:?]
        at ClodMC.jar/shadow.dev.jorel.commandapi.CommandAPIBukkit.registerCommandNode(CommandAPIBukkit.java:641) ~[ClodMC.jar:?]
        at ClodMC.jar/shadow.dev.jorel.commandapi.CommandAPIHandler.register(CommandAPIHandler.java:647) ~[ClodMC.jar:?]
        at ClodMC.jar/shadow.dev.jorel.commandapi.AbstractCommandAPICommand.register(AbstractCommandAPICommand.java:307) ~[ClodMC.jar:?]
        at ClodMC.jar/shadow.dev.jorel.commandapi.CommandAPICommand.register(CommandAPICommand.java:60) ~[ClodMC.jar:?]
        at ClodMC.jar/shadow.dev.jorel.commandapi.ExecutableCommand.register(ExecutableCommand.java:236) ~[ClodMC.jar:?]
        …

Other

Downgrading to Paper-1.20.6-b62 fixed the issue.

Probably caused by https://github.com/PaperMC/Paper/pull/8235

ps. your issue template doesn't have mc v1.20.6.

DerEchtePilz commented 2 months ago

Yeah, definitely caused by Paper‘s Brigadier PR; until we have a (hot)fix it might be best to stay on build 64

DerEchtePilz commented 1 month ago

@globau Just to clarify, when you load a plugin using the CommandAPI on a Paper server with the Paper Brigadier command API, does the plugin actually get disabled?

Sytm commented 1 month ago

One of my users also ran into this problem. This is the full exception: https://pastes.dev/JDnzZIMiXs As you can see my plugin is also disabled because of this (if this is what you meant)

DerEchtePilz commented 1 month ago

One of my users also ran into this problem. This is the full exception: https://pastes.dev/JDnzZIMiXs As you can see my plugin is also disabled because of this (if this is what you meant)

Thanks! I currently have a hotfix on dev/paper-hotfix (PR #555) if you want to check it out. Just waiting on approval and/or feedback but it should work.

DerEchtePilz commented 1 month ago

This is now hotfixed in snapshot version 9.5.0-SNAPSHOT It will take a while for it to deploy but once it is deployed, this issue is hotfixed.

frengor commented 1 month ago

Any plans on when 9.5.0 will be released? We're currently waiting for this to be fixed before releasing the new version of UltimateAdvancementAPI.

(no need to hurry, just to know, hope it isn't a month :skull:)

DerEchtePilz commented 1 month ago

@frengor Yeah, if released it probably will rather be 9.4.2 but @JorelAli is currently on a break so it might take until the end of the month.

JorelAli commented 1 month ago

Hotfix has been published to CommandAPI 9.4.2. For all intents and purposes, this should now be fixed for paper builds 64+