Permistry

Paper and Spigot plugin.yml errors

"Legacy plugin ... does not specify an api-version"

Server log
Legacy plugin MyPlugin v1.0 does not specify an api-version.

What it means

Without api-version the server assumes the plugin was written for Minecraft 1.12 or older. The plugin still loads, but the server turns on Legacy Material Support ("Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!"), which slows startup and rewrites the plugin's code at load time.

What causes it

plugin.yml has no api-version, or it is lower than 1.13.

How to fix it

Before

name: MyPlugin
version: '1.0'
main: com.example.myplugin.MyPlugin

After

name: MyPlugin
version: '1.0'
main: com.example.myplugin.MyPlugin
api-version: '1.21'

Use the oldest server version you test on. Servers older than that value will refuse the plugin.

Check the whole file. Paste your plugin.yml or drop the plugin jar into Permistry. It finds this and about 40 other problems, and explains each one in plain words. It runs in your browser and nothing is uploaded.

Open the checker