mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-13 08:28:02 +02:00
Attempt to stop GM wiping groups/users yml's on a bad shut down.
This commit is contained in:
parent
f712b56671
commit
30af6f36ce
@ -30,4 +30,5 @@ v 1.2:
|
|||||||
If present and set to false, op's will not get overriding permissions in GroupManager.
|
If present and set to false, op's will not get overriding permissions in GroupManager.
|
||||||
(one op will not be able to alter another op's settings)
|
(one op will not be able to alter another op's settings)
|
||||||
- GM will now create all relevant world data files for non mirrored worlds.
|
- GM will now create all relevant world data files for non mirrored worlds.
|
||||||
(for all worlds named in config.yml)
|
(for all worlds named in config.yml)
|
||||||
|
- Attempt to stop GM wiping groups/users yml's on a bad shut down.
|
@ -767,13 +767,15 @@ public class WorldDataHolder {
|
|||||||
aGroupMap.put("permissions", group.getPermissionList());
|
aGroupMap.put("permissions", group.getPermissionList());
|
||||||
}
|
}
|
||||||
|
|
||||||
DumperOptions opt = new DumperOptions();
|
if (!root.isEmpty()) {
|
||||||
opt.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
DumperOptions opt = new DumperOptions();
|
||||||
final Yaml yaml = new Yaml(opt);
|
opt.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
||||||
try {
|
final Yaml yaml = new Yaml(opt);
|
||||||
yaml.dump(root, new OutputStreamWriter(new FileOutputStream(groupsFile), "UTF-8"));
|
try {
|
||||||
} catch (UnsupportedEncodingException ex) {
|
yaml.dump(root, new OutputStreamWriter(new FileOutputStream(groupsFile), "UTF-8"));
|
||||||
} catch (FileNotFoundException ex) {
|
} catch (UnsupportedEncodingException ex) {
|
||||||
|
} catch (FileNotFoundException ex) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*FileWriter tx = null;
|
/*FileWriter tx = null;
|
||||||
@ -829,13 +831,16 @@ public class WorldDataHolder {
|
|||||||
aUserMap.put("subgroups", user.subGroupListStringCopy());
|
aUserMap.put("subgroups", user.subGroupListStringCopy());
|
||||||
//END SUBGROUPS NODE - BETA
|
//END SUBGROUPS NODE - BETA
|
||||||
}
|
}
|
||||||
DumperOptions opt = new DumperOptions();
|
|
||||||
opt.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
if (!root.isEmpty()) {
|
||||||
final Yaml yaml = new Yaml(opt);
|
DumperOptions opt = new DumperOptions();
|
||||||
try {
|
opt.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
||||||
yaml.dump(root, new OutputStreamWriter(new FileOutputStream(usersFile), "UTF-8"));
|
final Yaml yaml = new Yaml(opt);
|
||||||
} catch (UnsupportedEncodingException ex) {
|
try {
|
||||||
} catch (FileNotFoundException ex) {
|
yaml.dump(root, new OutputStreamWriter(new FileOutputStream(usersFile), "UTF-8"));
|
||||||
|
} catch (UnsupportedEncodingException ex) {
|
||||||
|
} catch (FileNotFoundException ex) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/*FileWriter tx = null;
|
/*FileWriter tx = null;
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user