跳到主要内容

IDEA开发基本配置

下载核心:https://getbukkit.org/download/spigot/

服务器启动:

避免等待20s

java -jar -DIReallyKnowWhatIAmDoingISwear=true spigot-1.20.6.jar

IDEA启动服务器配置:

image-20240909182042346

配置jar包输入位置直接到服务端的plugin目录下:

主要是配置outputDirectory为自己的服务端plugin位置

<properties>
<java.version>21</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<server.output>/Users/houyunfei/code/minecraft/server2/plugins</server.output>
</properties>
<build>
<plugins>
<!-- 指定jar输出目录-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<outputDirectory>
${server.output}
</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>