WesJD / AnvilGUI

Capture user input in Minecraft through an anvil GUI in under 20 lines of code
MIT License
466 stars 111 forks source link

NoClassDefFoundError #312

Closed FaMa91 closed 5 months ago

FaMa91 commented 5 months ago

I cannot manage to resolve the NoClassDefFoundError:

The error: immagine

The method:

private void search() {

    new AnvilGUI.Builder()
            .onClose(stateSnapshot -> {
                stateSnapshot.getPlayer().sendMessage("You closed the inventory.");
            })
            .onClick((slot, stateSnapshot) -> { // Either use sync or async variant, not both
                if(slot != AnvilGUI.Slot.OUTPUT) {
                    return Collections.emptyList();
                }

                if(stateSnapshot.getText().equalsIgnoreCase("you")) {
                    stateSnapshot.getPlayer().sendMessage("You have magical powers!");
                    return List.of(AnvilGUI.ResponseAction.close());
                } else {
                    return List.of(AnvilGUI.ResponseAction.replaceInputText("Try again"));
                }
            })
            .preventClose()
            .text("What is the meaning of life?")
            .title("Enter your answer.")
            .plugin(Feudal.getPlugin());
}

The pom: https://pastebin.com/vVPdJaSX

joestr commented 5 months ago

Which .jar did you put into the plugin folder? It seems like you did not deploy the *-shaded.jar file.

The pom.xml looks fine at the first glance.

FaMa91 commented 5 months ago

I used the *-shaded.jar too, same issue

@WesJD Why this issue has been closed?

WesJD commented 5 months ago

@WesJD Why this issue has been closed?

Because this is not a problem with AnvilGUI.

FaMa91 commented 5 months ago

How can you tell it? Do you know what is wrong and choose to not tell me or you are just assuming It? Anyway, yes it is, I managed to solve it myself. Your readme is wrong.

You as a developer should help people with this kind of problems too, I know is frustrating but is part of the job.