Paper and Spigot plugin.yml errors
"Cannot add self-loop edge on node" crashes the server at startup
java.lang.IllegalArgumentException: Cannot add self-loop edge on node MyPlugin, as self-loops are not allowed. To construct a graph that allows self-loops, call allowsSelfLoops(true) on the Builder.
What it means
Paper builds a graph of which plugin loads before which. A plugin that points to itself makes an edge from a node back to the same node, the graph library refuses it, and the exception is not caught. The whole server stops, not just your plugin. The node name in the message is the plugin that causes it.
What causes it
The plugin lists its own name in depend, softdepend or loadbefore. We reproduced the crash with each of the three keys.
How to fix it
Before
name: MyPlugin version: '1.0' main: com.example.myplugin.MyPlugin api-version: '26.3' softdepend: [Vault, MyPlugin]
After
name: MyPlugin version: '1.0' main: com.example.myplugin.MyPlugin api-version: '26.3' softdepend: [Vault]
This often happens after copying a plugin.yml from another project, or when a build tool fills the list from a variable. Check the plugin.yml inside the built jar, not only the one in your source folder.
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