LuckPerms Forge 5.4.84 crashing on startup
bloodmc opened this issue ยท 2 comments
Description
LP causes server to crash during startup with following error
[12Jun2023 17:51:51.840] [main/ERROR] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: Exception caught during firing event: 'com.mojang.brigadier.builder.LiteralArgumentBuilder net.minecraft.commands.Commands.literal(java.lang.String)'
Index: 2
Listeners:
0: NORMAL
1: ASM: net.minecraftforge.common.ForgeInternalHandler@1f62a01a onCommandsRegister(Lnet/minecraftforge/event/RegisterCommandsEvent;)V
2: net.minecraftforge.eventbus.EventBus$$Lambda$4128/0x000000080161d920@7e530782
java.lang.NoSuchMethodError: 'com.mojang.brigadier.builder.LiteralArgumentBuilder net.minecraft.commands.Commands.literal(java.lang.String)'
at me.lucko.luckperms.forge.ForgeCommandExecutor.onRegisterCommands(ForgeCommandExecutor.java:57)
Reproduction Steps
Launch Forge 1.20 with LP Forge 5.4.84
Expected Behaviour
LP should load normally
Server Details
Forge 1.20-46.0.14
LuckPerms Version
v5.4.84
Logs and Configs
No response
Extra Details
No response
Took a deep dive into issue and discovered 5.4.84 jarinjar did not reobf properly.
5.4.67
@SubscribeEvent
public void onRegisterCommands(RegisterCommandsEvent var1) {
for(String alias : COMMAND_ALIASES) {
LiteralCommandNode command = ((LiteralArgumentBuilder)Commands.m_82127_(alias).executes(this)).build();
ArgumentCommandNode argument = ((RequiredArgumentBuilder)Commands.m_82129_("args", StringArgumentType.greedyString()).suggests(this).executes(this)).build();
command.addChild(argument);
event.getDispatcher().getRoot().addChild(command);
}
}
5.4.84
@SubscribeEvent
public void onRegisterCommands(RegisterCommandsEvent var1) {
for(String alias : COMMAND_ALIASES) {
LiteralCommandNode command = ((LiteralArgumentBuilder)Commands.literal(alias).executes(this)).build();
ArgumentCommandNode argument = ((RequiredArgumentBuilder)Commands.argument("args", StringArgumentType.greedyString()).suggests(this).executes(this)).build();
command.addChild(argument);
event.getDispatcher().getRoot().addChild(command);
}
}
Looks like you accidentally removed the reobf call in build.gradle
See d859085#diff-ddd60d7dfd3c4ec88abdd0f353f5f0604cdb88151dc54bddf02d27433c7550b5L43-L46
d859085#diff-d55c9c929c678511042d53593d577baa916096e6747aaa8dd12285c2032a728eL59-L61