mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-06 20:43:11 +00:00
Stop throwing errors on an empty users file.
This commit is contained in:
parent
000d060ea6
commit
fd1c2824ce
2 changed files with 65 additions and 68 deletions
|
@ -75,3 +75,4 @@ v 1.5:
|
||||||
- Fixed a crash on reload due to bukkit not unloading plugins before reloading.
|
- Fixed a crash on reload due to bukkit not unloading plugins before reloading.
|
||||||
v 1.6:
|
v 1.6:
|
||||||
- Prevent Group.equals tests throwing a NullPointerException for GlobalGroups.
|
- Prevent Group.equals tests throwing a NullPointerException for GlobalGroups.
|
||||||
|
- Stop throwing errors on an empty users file.
|
|
@ -711,10 +711,8 @@ public class WorldDataHolder {
|
||||||
// PROCESS USERS FILE
|
// PROCESS USERS FILE
|
||||||
Map<String, Object> allUsersNode = (Map<String, Object>) usersRootDataNode.get("users");
|
Map<String, Object> allUsersNode = (Map<String, Object>) usersRootDataNode.get("users");
|
||||||
|
|
||||||
// Stop loading if the file is empty
|
// Load users if the file is NOT empty
|
||||||
if (allUsersNode == null)
|
if (allUsersNode != null)
|
||||||
return ;
|
|
||||||
|
|
||||||
for (String usersKey : allUsersNode.keySet()) {
|
for (String usersKey : allUsersNode.keySet()) {
|
||||||
Map<String, Object> thisUserNode = (Map<String, Object>) allUsersNode.get(usersKey);
|
Map<String, Object> thisUserNode = (Map<String, Object>) allUsersNode.get(usersKey);
|
||||||
User thisUser = ph.createUser(usersKey);
|
User thisUser = ph.createUser(usersKey);
|
||||||
|
@ -781,8 +779,6 @@ public class WorldDataHolder {
|
||||||
// Update the LastModified time.
|
// Update the LastModified time.
|
||||||
ph.usersFile = usersFile;
|
ph.usersFile = usersFile;
|
||||||
ph.setTimeStampUsers(usersFile.lastModified());
|
ph.setTimeStampUsers(usersFile.lastModified());
|
||||||
|
|
||||||
//return ph;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue