mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-06 21:18:03 +02:00
Remove all permission attachments when performing a manload or restart.
This commit is contained in:
parent
bd7af593e7
commit
25bd91eb80
@ -165,3 +165,4 @@ v 2.0:
|
||||
- Fix GM reporting of permission inheritance to retain the correct order. Lower inheritance groups can no longer negate a higher groups permissions.
|
||||
- Fix an error I caused trying to modify an unmodifiable list when parsing '*' permissions.
|
||||
- Don't throw errors when attempting to remove permission attachments (bukkit will have already removed it).
|
||||
- Remove all permission attachments when performing a manload or restart.
|
@ -106,6 +106,9 @@ public class GroupManager extends JavaPlugin {
|
||||
}
|
||||
|
||||
WorldEvents = null;
|
||||
|
||||
// Remove all attachments before clearing
|
||||
BukkitPermissions.removeAllAttachments();
|
||||
BukkitPermissions = null;
|
||||
|
||||
// EXAMPLE: Custom code, here we just output some info so we can check that
|
||||
|
@ -363,6 +363,15 @@ public class BukkitPermissions {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all attachments in case of a restart or reload.
|
||||
*/
|
||||
public void removeAllAttachments() {
|
||||
|
||||
for (Player player : attachments.keySet())
|
||||
removeAttachment(player);
|
||||
}
|
||||
|
||||
/**
|
||||
* Player events tracked to cause Superperms updates
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user