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

net/wesjd/anvilgui/AnvilGUI$StateSnapshot does not exist #313

Closed SubTheSandwich closed 5 months ago

SubTheSandwich commented 5 months ago

I am trying to use AnvilGUI, but it does not work. I have the dependency in my maven, and I shaded it, but it still doesn't work.

Maven:

<groupId>org.example</groupId>
<artifactId>MinecraftBasketball</artifactId>
<version>1.0-SNAPSHOT</version>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>3.5.1</version> <!-- The version must be at least 3.3.0 -->
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    <configuration>
                        <relocations>
                            <relocation>
                                <pattern>net.wesjd.anvilgui</pattern>
                                <shadedPattern>me.sub.MCB.anvilgui</shadedPattern> <!-- Replace [YOUR_PLUGIN_PACKAGE] with your namespace -->
                            </relocation>
                        </relocations>
                        <filters>
                            <filter>
                                <artifact>*:*</artifact>
                                <excludeDefaults>false</excludeDefaults>
                                <includes>
                                    <include>net/wesjd/anvilgui/**</include>
                                </includes>
                            </filter>
                        </filters>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

<properties>
    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.target>17</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<repositories>
    <!-- This adds the Spigot Maven repository to the build -->
    <repository>
        <id>spigot-repo</id>
        <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
    </repository>

    <repository>
        <id>codemc-snapshots</id>
        <url>https://repo.codemc.io/repository/maven-snapshots/</url>
    </repository>
</repositories>

<dependencies>
    <!--This adds the Spigot API artifact to the build -->

    <dependency>
        <groupId>net.wesjd</groupId>
        <artifactId>anvilgui</artifactId>
        <version>1.9.2-SNAPSHOT</version>
    </dependency>

    <dependency>
        <groupId>org.spigotmc</groupId>
        <artifactId>spigot-api</artifactId>
        <version>1.20.4-R0.1-SNAPSHOT</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>org.jetbrains</groupId>
        <artifactId>annotations</artifactId>
        <version>24.0.1</version>
        <scope>compile</scope>
    </dependency>

</dependencies>

WesJD commented 5 months ago

There are a plethora of past issues with people having issues using Maven. Please look through those for support.