Skip to content

Detect invalid permissions files on Bukkit servers - #219

Merged
pavog merged 2 commits into
masterfrom
bukkit-permissions-file-invalid
Nov 17, 2026
Merged

pavog merged 2 commits into
masterfrom
bukkit-permissions-file-invalid

Conversation

@pavog

@pavog pavog commented Nov 17, 2026

Copy link
Copy Markdown
Member
[16:22:40 WARN]: Server permissions file permissions.yml is not valid YAML: while parsing a flow sequence
[17:30:36 WARN]: Server permissions file permissions.yml is not valid YAML.
[17:31:03 ERROR]: Permission in permissions.yml was already defined
java.lang.IllegalArgumentException: The permission bukkit.command.plugins is already defined!

The server loads custom permissions from permissions.yml (or the file set as permissions-file in bukkit.yml).
When the file is not valid YAML, all permissions in it are ignored, and when it defines a permission that the server or a plugin already registered, that permission is skipped.
Neither was detected before.

This PR adds PermissionsFileProblem to the BukkitAnalyser, because the messages come from CraftBukkit's CraftServer#loadCustomPermissions() and also occur on Spigot.
It has two variants:

  • invalid YAML, logged with the parser error or with a stack trace when the file is not a map, with the existing FileDeleteSolution
  • an already defined permission, with the new PermissionRemoveSolution

The line Permission in permissions.yml was already defined only names the file, so the pattern also matches the exception in the next line to name the permission.
Server permissions file ... is empty, ignoring it is intentionally not matched, because it is only an info.

An already defined permission only happens when the file is loaded after the plugins, which is the default on Spigot, but not on Paper (load-permissions-yml-before-plugins in paper-global.yml).

Changes

  • add PermissionsFileProblem
  • add PermissionRemoveSolution
  • add translations for both variants and the solution
  • add paper-permissions-file-invalid-26-3.log, paper-permissions-file-not-a-map-26-3.log and paper-permission-already-defined-26-3.log

@pavog
pavog merged commit 56002e1 into master Nov 17, 2026
3 checks passed
@pavog
pavog deleted the bukkit-permissions-file-invalid branch November 17, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant