mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-02 13:31:54 +01:00
Reload GlobalGroups when you perform a world load.
Changed GlobalGroups to save/load before local groups in the scheduled data saving/loading
This commit is contained in:
parent
3aba996e97
commit
7726fd0081
@ -93,4 +93,6 @@ v 1.8:
|
||||
- manpromote and mandemote now correctly send the notification to the console if the command was issued there.
|
||||
- Expanded GlobalGroups.yml and Groups.yml to include Towny permissions.
|
||||
- Delayed GroupManager events so Superperms will be fully updated before plugins receive the events.
|
||||
- Changed the way events are raised to prevent variable corruption.
|
||||
- Changed the way events are raised to prevent variable corruption.
|
||||
- Reload GlobalGroups when you perform a world load.
|
||||
- Changed GlobalGroups to save/load before local groups in the scheduled data saving/loading
|
@ -1504,7 +1504,9 @@ public class GroupManager extends JavaPlugin {
|
||||
|
||||
isLoaded = false; // Disable Bukkit Perms update
|
||||
|
||||
globalGroups.load();
|
||||
worldsHolder.loadWorld(auxString);
|
||||
|
||||
sender.sendMessage("The request to world '" + auxString + "' was sent.");
|
||||
|
||||
isLoaded = true;
|
||||
|
@ -176,6 +176,16 @@ public class WorldsHolder {
|
||||
ArrayList<WorldDataHolder> alreadyDone = new ArrayList<WorldDataHolder>();
|
||||
Tasks.removeOldFiles(plugin, plugin.getBackupFolder());
|
||||
|
||||
// Write Global Groups
|
||||
if (GroupManager.getGlobalGroups().haveGroupsChanged()) {
|
||||
GroupManager.getGlobalGroups().writeGroups(overwrite);
|
||||
} else {
|
||||
if (GroupManager.getGlobalGroups().getTimeStampGroups() < GroupManager.getGlobalGroups().getGlobalGroupsFile().lastModified()) {
|
||||
System.out.print("Newer GlobalGroups file found (Loading changes)!");
|
||||
GroupManager.getGlobalGroups().load();
|
||||
}
|
||||
}
|
||||
|
||||
for (OverloadedWorldHolder w : worldsData.values()) {
|
||||
if (alreadyDone.contains(w)) {
|
||||
continue;
|
||||
@ -228,15 +238,6 @@ public class WorldsHolder {
|
||||
}
|
||||
alreadyDone.add(w);
|
||||
}
|
||||
// Write Global Groups
|
||||
if (GroupManager.getGlobalGroups().haveGroupsChanged()) {
|
||||
GroupManager.getGlobalGroups().writeGroups(overwrite);
|
||||
} else {
|
||||
if (GroupManager.getGlobalGroups().getTimeStampGroups() < GroupManager.getGlobalGroups().getGlobalGroupsFile().lastModified()) {
|
||||
System.out.print("Newer GlobalGroups file found (Loading changes)!");
|
||||
GroupManager.getGlobalGroups().load();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user