mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-10 18:38:18 +01:00
Better reporting when a users.yml is failing to load.
This commit is contained in:
parent
c33499797e
commit
7ba49afa0b
@ -147,4 +147,5 @@ v 1.9:
|
||||
- Prevent adding inheritances and info nodes to globalgroups. These are permissions collections, not player groups.
|
||||
- Prevent promoting players to, and demoting to GlobalGroups.
|
||||
- Make 'manload' reload the config correctly.
|
||||
- Minor optimization when checking bukkit permissions.
|
||||
- Minor optimization when checking bukkit permissions.
|
||||
- Better reporting when a users.yml is failing to load.
|
@ -602,7 +602,12 @@ public class WorldDataHolder {
|
||||
// Load users if the file is NOT empty
|
||||
if (allUsersNode != null)
|
||||
for (String usersKey : allUsersNode.keySet()) {
|
||||
Map<String, Object> thisUserNode = (Map<String, Object>) allUsersNode.get(usersKey);
|
||||
Map<String, Object> thisUserNode = null;
|
||||
try {
|
||||
thisUserNode = (Map<String, Object>) allUsersNode.get(usersKey);
|
||||
} catch (Exception ex) {
|
||||
throw new IllegalArgumentException("Bad format found in file: " + usersFile.getPath());
|
||||
}
|
||||
User thisUser = ph.createUser(usersKey);
|
||||
if (thisUser == null) {
|
||||
throw new IllegalArgumentException("I think this user was declared more than once: " + usersKey + " in file: " + usersFile.getPath());
|
||||
|
Loading…
Reference in New Issue
Block a user