diff options
author | snowleo <schneeleo@gmail.com> | 2011-11-17 15:34:05 +0100 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-11-17 15:34:05 +0100 |
commit | c073285a87b72d793a12a27a2a6ac441d920aa24 (patch) | |
tree | 198e11bf1f38ebc5624577a1e76c0bb2caf1cedc /EssentialsGroupManager/src/org | |
parent | 8852910c7acb92a65424836fb3c13eaab8b09345 (diff) | |
parent | 50f07f4ad7e0ebca77a38b3ea4630443388cc2fa (diff) | |
download | Essentials-c073285a87b72d793a12a27a2a6ac441d920aa24.tar Essentials-c073285a87b72d793a12a27a2a6ac441d920aa24.tar.gz Essentials-c073285a87b72d793a12a27a2a6ac441d920aa24.tar.lz Essentials-c073285a87b72d793a12a27a2a6ac441d920aa24.tar.xz Essentials-c073285a87b72d793a12a27a2a6ac441d920aa24.zip |
Merge branch 'refs/heads/groupmanager'
Diffstat (limited to 'EssentialsGroupManager/src/org')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java | 3 | ||||
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java | 12 |
2 files changed, 11 insertions, 4 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java index d2d8d3b27..d8b7a15e1 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -130,6 +130,9 @@ public class GroupManager extends JavaPlugin { throw new IllegalStateException("An error ocurred while loading GroupManager"); } + // Set a few defaults (reloads) + setLoaded(false); + // Initialize the world listener and bukkit permissions to handle // events. WorldEvents = new GMWorldListener(this); 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. |