Bukkit/Bukkit — pull request #500 by samp20 (2012-01-26 22:40:44+00:00)
Title: Implemented priorities for PermissionAttachments

Added extra methods to permissible to allow you to specify a priority for a PermissionAttachment. This allows one plugin to overrride the permissions given to a player of another plugin.

For example consider bPermissions for regular permissions, and a Jail plugin that revokes permissions. In a normal situation each player would just have their attachments from bPermissions. If a player were to get jailed then the jail could create an attachment at a higher priority to that of bPermissions (default is 5.0). Even if bPermissions removed, then added their attachment again the jail would still have priority. This was not the case before.

Since I added methods for Permissible, I've had to create a separate pull request for CraftBukkit to implement them in various classes.

Finally I have removed two redundant calls to permissible.recalculatePermissions(); in PermissionAttachment. I have identified a few other redundant calls, although it might require a bit more refactoring.