Skip to content

CosmeticsCore v1.3.6 causes NoClassDefFoundError with PlaceholderAPI on Paper 1.21.5 #328

@tanapatsongwriter

Description

@tanapatsongwriter

Terms

  • I'm using the very latest version of CosmeticsCore and its dependencies.
  • I already searched on this Github page to check if the same issue was already reported.
  • I already searched on the plugin wiki to know if a solution is already known.
  • I already searched on the Discord server to know if anyone already provided a solution in the past for the issue.

Discord tag (optional)

No response

What happened?

When I try to use any cosmetics command, I get an unexpected error, and this shows up in the console.

Steps to reproduce the issue

  1. Start a clean server using Paper version 1.21.5.
  2. Install the latest versions of PlaceholderAPI and CosmeticsCore (v1.3.6).
  3. Start the server. The server will load without any startup errors.
  4. Join the game as an OP'd player.
  5. Type the command "/cosmetics" in the chat.
  6. The command will fail with the in-game message "an unexpected error occurred...".
  7. Check the server console to see the "NoClassDefFoundError: dev/lone/cosmeticscore/api/CosmeticsCoreAPI" stack trace, which I have provided in the Pastebin link.

Server version

paper 1.21.5

CosmeticsCore Version

CosmeticsCore 1.3.6

ProtocolLib Version

ProtocolLib 5.3.0

FULL server log

No response

Error (optional)

[11:16:14 ERROR]: Command exception: /cosmetics
org.bukkit.command.CommandException: Cannot execute command 'cosmetics' in plugin CosmeticsCore v1.3.6 - plugin is disabled.
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37) ~[paper-api-1.21.5-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:83) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.3.10.jar:?]
        at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:30) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:13) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:105) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:449) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.commands.Commands.performCommand(Commands.java:357) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.commands.Commands.performCommand(Commands.java:347) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.commands.Commands.performCommand(Commands.java:341) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2269) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$12(ServerGamePacketListenerImpl.java:2242) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:155) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1446) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:175) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:129) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1426) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1420) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:139) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1377) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1385) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1262) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
        at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:308) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]

CosmeticsCore config.yml

Problematic items yml configuration file (optional)

Other files, you can drag and drop them here to upload. (optional)

restart server :

[11:30:35 INFO]: [CosmeticsCore] Enabling CosmeticsCore v1.3.6
[11:30:35 ERROR]: Error occurred while enabling CosmeticsCore v1.3.6 (Is it up to date?)
java.lang.NoClassDefFoundError: org/fusesource/jansi/Ansi
at CosmeticsCore_1.3.6.jar/dev.lone.cosmeticscore.dy.(SourceFile:26) ~[CosmeticsCore_1.3.6.jar:?]
at CosmeticsCore_1.3.6.jar/dev.lone.cosmeticscore.ei.(SourceFile:16) ~[CosmeticsCore_1.3.6.jar:?]
at CosmeticsCore_1.3.6.jar/dev.lone.cosmeticscore.n.r(SourceFile:236) ~[CosmeticsCore_1.3.6.jar:?]
at CosmeticsCore_1.3.6.jar/dev.lone.cosmeticscore.n.p(SourceFile:101) ~[CosmeticsCore_1.3.6.jar:?]
at CosmeticsCore_1.3.6.jar/dev.lone.cosmeticscore.Main.onEnable(SourceFile:76) ~[CosmeticsCore_1.3.6.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:280) ~[paper-api-1.21.5-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[paper-api-1.21.5-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:653) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:608) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:741) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:486) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:280) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1161) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:308) ~[paper-1.21.5.jar:1.21.5-113-ba7fb23]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.ClassNotFoundException: org.fusesource.jansi.Ansi
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:197) ~[paper-api-1.21.5-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:164) ~[paper-api-1.21.5-R0.1-SNAPSHOT.jar:?]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?]
... 17 more

Screenshots/Videos (you can drag and drop files or paste links)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    verdict: invalidThis issue is not precise and lacks proper information to be worked on.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions