Skip to content
Success

Changes

Summary

  1. Apply default permissions by registration order. (details)
Commit 3a1d5b8f817062264e05d03701cfe2b8ec6bad37 by md_5
Apply default permissions by registration order.
When permissibles recalculate their permissions they set the default
permission values in the order as the default permissions are provided
by the plugin manager.
This order is currently arbitrary and can even change depending on the
number of buckets of the underlying hashset which stores those default
permissions.
When a plugin defines default permissions inside its plugin.yml (eg.
permission 'A' with default value 'true') and a server admin defines
different default values for these permissions inside the
permissions.yml (eg. permission 'myDefaultPerms' with default value
'true' and with child 'A' set to 'false'), then the outcome will depend
on the order in which those default permissions (and their childs) get
evaluated inside PermissableBase#recalculatePermissions(). The
permission which gets processed last will overwrite the permission value
of 'A' according to its definition. Since this order is arbitrary and
inconsistent, the server admin will experience weird behavior with his
defined default permissions sometimes working and sometimes not.
The file was modifiedsrc/main/java/org/bukkit/plugin/SimplePluginManager.java