CommandAPI icon indicating copy to clipboard operation
CommandAPI copied to clipboard

`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

Open globau opened this issue 1 year ago • 7 comments

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.

globau avatar May 12 '24 05:05 globau

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

DerEchtePilz avatar May 12 '24 06:05 DerEchtePilz

@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?

DerEchtePilz avatar May 12 '24 17:05 DerEchtePilz

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)

Sytm avatar May 12 '24 19:05 Sytm

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 avatar May 12 '24 19:05 DerEchtePilz

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.

DerEchtePilz avatar May 12 '24 19:05 DerEchtePilz

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:)

frengor avatar May 14 '24 00:05 frengor

@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.

DerEchtePilz avatar May 14 '24 07:05 DerEchtePilz

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

JorelAli avatar May 27 '24 18:05 JorelAli