You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Intellij启动Spigot服务器后插件未加载问题求助

Hey there! Let's get your Spigot plugin up and running—this is such a common first hurdle, so don't stress 😊

Fixing "Plugins (0):" Issue in Spigot

1. Compile and Export Your Plugin Jar Correctly

First, you need to turn your code into a Jar file that Spigot can recognize. Here's how to do it in IntelliJ:

  • Open the Gradle panel on the right (if it's hidden, go to View > Tool Windows > Gradle to show it)
  • Expand your project, navigate to Tasks > build > build, then double-click it. This will generate a Jar file in your project's build/libs folder (it'll look like YourProjectName-Version.jar)
  • Copy this Jar file into the plugins subfolder of your Spigot server directory

2. Double-Check Your plugin.yml Configuration

This is the most common mistake for new devs! The plugin.yml is what tells Spigot about your plugin, so it must have these required fields:

name: MyFirstPlugin  # Replace with your plugin's name
main: com.yourname.myplugin.MyPlugin  # Full path to your main Java class (package + class name)
version: 1.0
api-version: 1.20  # Match this to your Spigot server version (e.g., 1.19, 1.20.1)

Critical notes:

  • The main value must exactly match your main class's full path. For example, if your main class is in package com.example.testplugin and named Main, you need to write com.example.testplugin.Main here
  • api-version has to align with your server's version—mismatches often cause plugins to fail silently

3. Verify IntelliJ's Server Run Configuration

Sometimes IntelliJ is pointing to a different server directory than you think! Let's check:

  • Click the dropdown next to the run button in the top-right corner of IntelliJ, then select Edit Configurations
  • Find your Spigot server configuration and look at the Working directory field. It should point directly to your Spigot server root folder (the one containing plugins, worlds, and the Spigot Jar)
  • If it's wrong, update the path and restart the server

4. Check Server Logs for Errors

If the plugin still isn't loading, dig into the server logs to find clues:

  • Open logs/latest.log in your server directory
  • Look for lines like "Could not load plugin" or "Invalid plugin.yml"—these will tell you exactly what's broken (e.g., wrong main class path, missing required fields)

Quick Test Tip

Try launching the server manually (without IntelliJ) to rule out IDE configuration issues:

  1. Put your plugin Jar into the plugins folder
  2. Run java -jar spigot-[your-version].jar in your server directory
  3. Watch the console—you should see a line like "[MyFirstPlugin] Enabled!" if everything works

内容的提问来源于stack exchange,提问作者Anton Bakulin

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.09 20:47:39