mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-15 02:59:06 +02:00
Attempt to stop GM wiping groups/users yml's on a bad shut down.
This commit is contained in:
@@ -31,3 +31,4 @@ v 1.2:
|
|||||||
(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,6 +767,7 @@ public class WorldDataHolder {
|
|||||||
aGroupMap.put("permissions", group.getPermissionList());
|
aGroupMap.put("permissions", group.getPermissionList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!root.isEmpty()) {
|
||||||
DumperOptions opt = new DumperOptions();
|
DumperOptions opt = new DumperOptions();
|
||||||
opt.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
opt.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
||||||
final Yaml yaml = new Yaml(opt);
|
final Yaml yaml = new Yaml(opt);
|
||||||
@@ -775,6 +776,7 @@ public class WorldDataHolder {
|
|||||||
} catch (UnsupportedEncodingException ex) {
|
} catch (UnsupportedEncodingException ex) {
|
||||||
} catch (FileNotFoundException ex) {
|
} catch (FileNotFoundException ex) {
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*FileWriter tx = null;
|
/*FileWriter tx = null;
|
||||||
try {
|
try {
|
||||||
@@ -829,6 +831,8 @@ public class WorldDataHolder {
|
|||||||
aUserMap.put("subgroups", user.subGroupListStringCopy());
|
aUserMap.put("subgroups", user.subGroupListStringCopy());
|
||||||
//END SUBGROUPS NODE - BETA
|
//END SUBGROUPS NODE - BETA
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!root.isEmpty()) {
|
||||||
DumperOptions opt = new DumperOptions();
|
DumperOptions opt = new DumperOptions();
|
||||||
opt.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
opt.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
||||||
final Yaml yaml = new Yaml(opt);
|
final Yaml yaml = new Yaml(opt);
|
||||||
@@ -837,6 +841,7 @@ public class WorldDataHolder {
|
|||||||
} catch (UnsupportedEncodingException ex) {
|
} catch (UnsupportedEncodingException ex) {
|
||||||
} catch (FileNotFoundException ex) {
|
} catch (FileNotFoundException ex) {
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/*FileWriter tx = null;
|
/*FileWriter tx = null;
|
||||||
try {
|
try {
|
||||||
tx = new FileWriter(usersFile, false);
|
tx = new FileWriter(usersFile, false);
|
||||||
|
Reference in New Issue
Block a user