mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-09-12 05:08:48 +00: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
|
@ -94,3 +94,5 @@ v 1.8:
|
||||||
- Expanded GlobalGroups.yml and Groups.yml to include Towny permissions.
|
- Expanded GlobalGroups.yml and Groups.yml to include Towny permissions.
|
||||||
- Delayed GroupManager events so Superperms will be fully updated before plugins receive the events.
|
- 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
|
isLoaded = false; // Disable Bukkit Perms update
|
||||||
|
|
||||||
|
globalGroups.load();
|
||||||
worldsHolder.loadWorld(auxString);
|
worldsHolder.loadWorld(auxString);
|
||||||
|
|
||||||
sender.sendMessage("The request to world '" + auxString + "' was sent.");
|
sender.sendMessage("The request to world '" + auxString + "' was sent.");
|
||||||
|
|
||||||
isLoaded = true;
|
isLoaded = true;
|
||||||
|
|
|
@ -176,6 +176,16 @@ public class WorldsHolder {
|
||||||
ArrayList<WorldDataHolder> alreadyDone = new ArrayList<WorldDataHolder>();
|
ArrayList<WorldDataHolder> alreadyDone = new ArrayList<WorldDataHolder>();
|
||||||
Tasks.removeOldFiles(plugin, plugin.getBackupFolder());
|
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()) {
|
for (OverloadedWorldHolder w : worldsData.values()) {
|
||||||
if (alreadyDone.contains(w)) {
|
if (alreadyDone.contains(w)) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -228,15 +238,6 @@ public class WorldsHolder {
|
||||||
}
|
}
|
||||||
alreadyDone.add(w);
|
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 a new issue