Permistry

Paper and Spigot plugin.yml errors

StackOverflowError in PermissibleBase.calculateChildPermissions

Server log
java.lang.StackOverflowError
	at org.bukkit.permissions.PermissibleBase.calculateChildPermissions(PermissibleBase.java:207)
	at org.bukkit.permissions.PermissibleBase.calculateChildPermissions(PermissibleBase.java:207)
	...

What it means

Bukkit expands permission children recursively and never checks for loops. If permission A includes B and B includes A, it keeps going until the Java stack runs out. On Paper 26.3 this crashed the server during startup in our test, right after the plugin was enabled.

What causes it

A loop in children under permissions: two or more permissions that include each other. It crashes at startup when any permission in the loop is given to operators by default (default: op, default: true, or no default at all, which means op), because the console is an operator. With default: false the server starts, and the same code runs later when a player is given one of them.

How to fix it

Before

permissions:
  myplugin.*:
    default: op
    children:
      myplugin.admin: true
  myplugin.admin:
    children:
      myplugin.*: true

After

permissions:
  myplugin.*:
    default: op
    children:
      myplugin.admin: true
  myplugin.admin:
    children:
      myplugin.reload: true

Loops are easy to miss when a wildcard like myplugin.* is a child of something it also contains. Permistry draws the chain for you, for example myplugin.* → myplugin.admin → myplugin.*.

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