Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: net/minecraft/world/entity/player/EntityHuman
sdxqw opened this issue · 6 comments
[02:40:29 ERROR]: Encountered an unexpected exception
java.lang.ExceptionInInitializerError: null
at brettwars-1.0-dev-all.jar/brettwars.invui.window.AbstractWindow.openInventory(AbstractWindow.java:286) ~[brettwars-1.0-dev-all.jar:?]
at brettwars-1.0-dev-all.jar/brettwars.invui.window.AbstractWindow.open(AbstractWindow.java:282) ~[brettwars-1.0-dev-all.jar:?]
at brettwars-1.0-dev-all.jar/brettwars.invui.window.AbstractWindow$AbstractBuilder.open(AbstractWindow.java:679) ~[brettwars-1.0-dev-all.jar:?]
at brettwars-1.0-dev-all.jar/brettwars.inventories.GameMapSelector.open(GameMapSelector.java:31) ~[brettwars-1.0-dev-all.jar:?]
at brettwars-1.0-dev-all.jar/brettwars.commands.StartCommand.execute(StartCommand.java:37) ~[brettwars-1.0-dev-all.jar:?]
at io.papermc.paper.command.brigadier.PaperCommands.lambda$register$2(PaperCommands.java:187) ~[paper-1.21.jar:1.21-40-b45d9b6]
at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:446) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.commands.Commands.performCommand(Commands.java:353) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.commands.Commands.performCommand(Commands.java:340) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.commands.Commands.performCommand(Commands.java:335) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2147) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$11(ServerGamePacketListenerImpl.java:2121) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1478) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1456) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1449) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1408) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1415) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1260) ~[paper-1.21.jar:1.21-40-b45d9b6]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329) ~[paper-1.21.jar:1.21-40-b45d9b6]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: net/minecraft/world/entity/player/EntityHuman
at brettwars-1.0-dev-all.jar/brettwars.inventoryaccess.util.ReflectionUtils.getImplClass(ReflectionUtils.java:18) ~[brettwars-1.0-dev-all.jar:?]
at brettwars-1.0-dev-all.jar/brettwars.inventoryaccess.InventoryAccess.(InventoryAccess.java:21) ~[brettwars-1.0-dev-all.jar:?]
... 32 more
Caused by: java.lang.NoClassDefFoundError: net/minecraft/world/entity/player/EntityHuman
at java.base/java.lang.Class.forName0(Native Method) ~[?:?]
at java.base/java.lang.Class.forName(Class.java:534) ~[?:?]
at java.base/java.lang.Class.forName(Class.java:513) ~[?:?]
at io.papermc.reflectionrewriter.runtime.AbstractDefaultRulesReflectionProxy.forName(AbstractDefaultRulesReflectionProxy.java:68) ~[reflection-rewriter-runtime-0.0.3.jar:?]
at io.papermc.paper.pluginremap.reflect.PaperReflectionHolder.forName(Unknown Source) ~[paper-1.21.jar:1.21-40-b45d9b6]
at brettwars-1.0-dev-all.jar/brettwars.inventoryaccess.util.ReflectionUtils.getImplClass(ReflectionUtils.java:16) ~[brettwars-1.0-dev-all.jar:?]
at brettwars-1.0-dev-all.jar/brettwars.inventoryaccess.InventoryAccess.(InventoryAccess.java:21) ~[brettwars-1.0-dev-all.jar:?]
... 32 more
Caused by: java.lang.ClassNotFoundException: net.minecraft.world.entity.player.EntityHuman
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:197) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:164) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?]
at java.base/java.lang.Class.forName0(Native Method) ~[?:?]
at java.base/java.lang.Class.forName(Class.java:534) ~[?:?]
at java.base/java.lang.Class.forName(Class.java:513) ~[?:?]
at io.papermc.reflectionrewriter.runtime.AbstractDefaultRulesReflectionProxy.forName(AbstractDefaultRulesReflectionProxy.java:68) ~[reflection-rewriter-runtime-0.0.3.jar:?]
at io.papermc.paper.pluginremap.reflect.PaperReflectionHolder.forName(Unknown Source) ~[paper-1.21.jar:1.21-40-b45d9b6]
at brettwars-1.0-dev-all.jar/brettwars.inventoryaccess.util.ReflectionUtils.getImplClass(ReflectionUtils.java:16) ~[brettwars-1.0-dev-all.jar:?]
at brettwars-1.0-dev-all.jar/brettwars.inventoryaccess.InventoryAccess.(InventoryAccess.java:21) ~[brettwars-1.0-dev-all.jar:?]
... 32 more
CODE:
package brettwars.inventories;
import lombok.Getter;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import xyz.xenondevs.invui.gui.Gui;
import xyz.xenondevs.invui.item.builder.ItemBuilder;
import xyz.xenondevs.invui.item.impl.SimpleItem;
import xyz.xenondevs.invui.window.Window;
/**
-
Simple GUI to select a map.
*/
@getter
public class GameMapSelector {
private final Gui gui;/**
- Creates a new map selector GUI.
*/
public GameMapSelector() {
this.gui = Gui.normal().setStructure("# # # # # # # # #", "# . . . . . . . #", "# . . . . . . . #", "# # # # # # # # #").addIngredient('#', new SimpleItem(new ItemBuilder(Material.BLACK_STAINED_GLASS_PANE))).build();
}
/**
- Opens the map selector for the given player.
- @param player the player to open the selector for
*/
public void open(Player player) {
Window.single().setGui(gui).setTitle("InvUI").open(player);
}
}
- Creates a new map selector GUI.
Version 1.21
PaperMC
I've added a new documentation section regarding paper plugins: https://docs.xen.cx/invui/#paper-plugin
It also seems like you may not be running the latest version of InvUI.
Hello, I'm using the lastet's version on the github page, and the docs should work correct?
and the docs should work correct?
What do you mean by that?
I assumed this is a paper plugin, is it not?
yes it is a paper plugin 1.20.6, but this doesn't work :/
plugins {
id("java")
id("io.papermc.paperweight.userdev") version "1.7.1"
id("xyz.jpenilla.run-paper") version "2.3.0"
id("xyz.jpenilla.resource-factory-bukkit-convention") version "1.1.1"
id("io.github.goooler.shadow") version "8.1.8"
}
group = "brettwars"
version = "1.0"
description = "Bedwars plugin for brettwars"
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.xenondevs.xyz/releases")
}
dependencies {
compileOnly("org.projectlombok:lombok:1.18.34")
annotationProcessor("org.projectlombok:lombok:1.18.34")
implementation("xyz.xenondevs.invui:invui:1.32")
paperweight.paperDevBundle("1.21-R0.1-SNAPSHOT")
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
tasks {
compileJava {
options.release.set(21)
}
javadoc {
options.encoding = "UTF-8"
}
shadowJar {
archiveClassifier.set("shadow")
}
build {
dependsOn("shadowJar", "assemble")
}
runServer {
minecraftVersion("1.21")
}
assemble {
dependsOn(reobfJar)
}
}
paperweight {
reobfArtifactConfiguration.set(io.papermc.paperweight.userdev.ReobfArtifactConfiguration.REOBF_PRODUCTION)
}
bukkitPluginYaml {
main = "brettwars.Bedwars"
authors = listOf("Hobbyshop", "sdxq")
apiVersion = "1.21"
version = project.version.toString()
description = project.description
permissions {
create("cmd.start") {
description.set("Allow players to skip the lobby countdown.")
}
create("cmd.setup") {
description.set("Allows players to use the command to create a new game map.")
}
}
commands {
create("start") {
description.set("Used to create a new game map.")
usage.set("/start")
permission.set("cmd.start")
permissionMessage.set("You don't have permission to use this command.")
}
create("setup") {
description.set("Setup the bedwars game.")
usage.set("/setup")
permission.set("cmd.setup")
permissionMessage.set("You don't have permission to use this command.")
}
}
}
my gradle build, any help with it, as I cannot undestand to make my plugin support spigot remaps!