mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-12 17:45:08 +02: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:
@@ -93,4 +93,6 @@ v 1.8:
|
|||||||
- manpromote and mandemote now correctly send the notification to the console if the command was issued there.
|
- 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.
|
- 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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user