我正在尝试更新一个插件[1.18.2],我还没有把自己写到minecraft 1.19.3。但是我正在努力弄清楚如何添加craftbukkit作为依赖项。我使用maven,在mvnrepository.com中似乎无法找到1.19.3。进一步的调查让我找到了buildtools,我运行了它,它确实给了我几个文件夹和jar文件,其中一个是craftbukkit、spigot和bukkit。
然而,尝试将这些jar文件添加为依赖项也会导致引用不存在的文件的错误。即使该文件确实存在于项目的资源文件夹中。
<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>
我还尝试更改路径以从我的源文件夹开始,但这不起作用。任何帮助都将不胜感激。
我不确定您是否可以将CraftBukkit添加为依赖项。它需要是bukkit或spigot,因为CraftBukkit是服务器mod,而不是插件API。这是Spigot导入的代码。
<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>