summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r--EssentialsGroupManager/src/Changelog.txt3
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java10
2 files changed, 9 insertions, 4 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index cc9192da9..5264a88b9 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -63,4 +63,5 @@ v 1.5:
- Fixed an error on 'manucheckv'. If the users doesn't have the variable it fell through causing an exception.
- Added checking of subgroups for Info nodes.
- Expanded 'canUserBuild()' to include inheritance and subgroups.
- - Added a config.yml setting of 'validate_toggle' for those who prefer 'mantogglevalidate' to always be off. \ No newline at end of file
+ - Added a config.yml setting of 'validate_toggle' for those who prefer 'mantogglevalidate' to always be off.
+ - Prevent setting 'minutes' in the config to zero causing an error. \ No newline at end of file
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
index bbe5cae09..ff77a76a4 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
@@ -88,10 +88,10 @@ public class GroupManager extends JavaPlugin {
public void onDisable() {
setLoaded(false);
+ disableScheduler(); // Shutdown before we save, so it doesn't interfere.
if (worldsHolder != null) {
worldsHolder.saveChanges();
}
- disableScheduler();
WorldEvents = null;
BukkitPermissions = null;
@@ -181,9 +181,13 @@ public class GroupManager extends JavaPlugin {
}
};
scheduler = new ScheduledThreadPoolExecutor(1);
- int minutes = getGMConfig().getSaveInterval();
+ long minutes = (long)getGMConfig().getSaveInterval();
+ if (minutes > 0) {
scheduler.scheduleAtFixedRate(commiter, minutes, minutes, TimeUnit.MINUTES);
- GroupManager.logger.info("Scheduled Data Saving is set for every " + minutes + " minutes!");
+ GroupManager.logger.info("Scheduled Data Saving is set for every " + minutes + " minutes!");
+ } else
+ GroupManager.logger.info("Scheduled Data Saving is Disabled!");
+
GroupManager.logger.info("Backups will be retained for " + getGMConfig().getBackupDuration() + " hours!");
}
}