summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src/org
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2011-11-17 05:46:01 +0000
committerElgarL <ElgarL@palmergames.com>2011-11-17 05:46:01 +0000
commit022f7ab1d45492ce5cebba077cb4ffad8c637e9b (patch)
tree01f28c0f6950c6a014286f6a73c44258c8c16f7c /EssentialsGroupManager/src/org
parentf4e22a17db5cf86fbf972f1584fcc2858af75022 (diff)
downloadEssentials-022f7ab1d45492ce5cebba077cb4ffad8c637e9b.tar
Essentials-022f7ab1d45492ce5cebba077cb4ffad8c637e9b.tar.gz
Essentials-022f7ab1d45492ce5cebba077cb4ffad8c637e9b.tar.lz
Essentials-022f7ab1d45492ce5cebba077cb4ffad8c637e9b.tar.xz
Essentials-022f7ab1d45492ce5cebba077cb4ffad8c637e9b.zip
Fixed GM holding files open and causing the time stamp to be incorrect.
This caused GM to require a '/mansave force' when it shouldn't be needed.
Diffstat (limited to 'EssentialsGroupManager/src/org')
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
index e8e01967f..7dbeea7b1 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
@@ -338,7 +338,7 @@ public class WorldDataHolder {
}
this.setDefaultGroup(this.getGroup(ph.getDefaultGroup().getName()));
this.removeGroupsChangedFlag();
- this.timeStampGroups = ph.getTimeStampGroups();
+ this.timeStampGroups = getGroupsFile().lastModified();
ph = null;
} catch (Exception ex) {
@@ -368,7 +368,7 @@ public class WorldDataHolder {
tempUser.clone(this);
}
this.removeUsersChangedFlag();
- this.timeStampUsers = ph.getTimeStampUsers();
+ this.timeStampUsers = getUsersFile().lastModified();
ph = null;
} catch (Exception ex) {
@@ -925,6 +925,7 @@ public class WorldDataHolder {
out.write(newLine);
yaml.dump(root, out);
+ out.close();
} catch (UnsupportedEncodingException ex) {
} catch (FileNotFoundException ex) {
} catch (IOException e) {
@@ -995,10 +996,13 @@ public class WorldDataHolder {
opt.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
final Yaml yaml = new Yaml(opt);
try {
- yaml.dump(root, new OutputStreamWriter(new FileOutputStream(usersFile), "UTF-8"));
+ OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(usersFile), "UTF-8");
+ yaml.dump(root, out);
+ out.close();
} catch (UnsupportedEncodingException ex) {
} catch (FileNotFoundException ex) {
- }
+ } catch (IOException e) {
+ }
}
// Update the LastModified time.