B
BlackSpigot Guides
Guest
Goal: confirm that your build produces a plugin the server can discover.
Start with a project targeting your intended server API. Keep the main class in a named Java package and extend JavaPlugin. Put plugin.yml in src/main/resources so the build places it at the root of the JAR.
A minimal descriptor for your own example class looks like this:
The main value must exactly match your class's package and name. Add api-version for the API release you actually target; do not copy an unrelated current version into an older project.
Build with your project's Maven or Gradle task. Open the resulting JAR as an archive and check for plugin.yml and net/example/workshop/WorkshopHello.class. Copy that JAR to a separate test server, restart it, then inspect the startup log.
If it fails, fix the first exception before adding commands, databases or listeners. Keep a small working baseline so each new feature has a clear before-and-after test.
Descriptor reference
Start with a project targeting your intended server API. Keep the main class in a named Java package and extend JavaPlugin. Put plugin.yml in src/main/resources so the build places it at the root of the JAR.
A minimal descriptor for your own example class looks like this:
YAML:
name: WorkshopHello
version: 1.0.0
main: net.example.workshop.WorkshopHello
Build with your project's Maven or Gradle task. Open the resulting JAR as an archive and check for plugin.yml and net/example/workshop/WorkshopHello.class. Copy that JAR to a separate test server, restart it, then inspect the startup log.
If it fails, fix the first exception before adding commands, databases or listeners. Keep a small working baseline so each new feature has a clear before-and-after test.
Descriptor reference
