0

I am trying to update a plugin [in 1.18.2] that I haven't written myself to minecraft 1.19.3. However I am struggling with figuring out how to add craftbukkit as a dependency. I use maven and it seems to be unfindable for 1.19.3 in the mvnrepository.com. Further investigation led me to buildtools, which I ran and it did give me several folders and jar files, one of which is craftbukkit, spigot and bukkit.

However trying to add those jar files as dependencies also gave me errors of referencing to a non-existing file. Even though the file does exist in the resource folder of the project.

<dependency>
            <groupId>org.bukkit</groupId>
            <artifactId>craftbukkit</artifactId>
            <version>1.19.3-R0.1-SNAPSHOT</version>
            <scope>system</scope>
            <systemPath>/GUIMarketplaceDirectory-master/src/main/resources/craftbukkit-1.19.3.jar</systemPath>
        </dependency>

I also tried changing the path to start at my very source folder, but this didn't work. Any help would be appreciated.

Fuzetea17
  • 19
  • 3

1 Answers1

0

I'm not sure you can add CraftBukkit as a dependency. It needs to be either bukkit, or spigot, since CraftBukkit is a server mod, not the plugin API. Here is code for a Spigot import.

<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>
    </repositories>

    <properties>
            <maven.compiler.source>1.8</maven.compiler.source>
            <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

    <dependencies>
            <!--This adds the Spigot API artifact to the build -->
            <dependency>
                    <groupId>org.spigotmc</groupId>
                    <artifactId>spigot-api</artifactId>
                    <version>1.19.3-R0.1-SNAPSHOT</version>
                    <scope>provided</scope>
            </dependency>
    </dependencies>
Daniel
  • 66
  • 7