diff options
author | ElgarL <ElgarL@palmergames.com> | 2011-09-03 15:29:44 +0100 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2011-09-03 15:29:44 +0100 |
commit | e2024ca2b63112cbb343812e4d4354c98245e03b (patch) | |
tree | d8a85f269ef6d8f4621342237538af0cfa94a25c /EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder | |
parent | 80491513a2ba82889d95dd246bfd0482a519e276 (diff) | |
download | Essentials-e2024ca2b63112cbb343812e4d4354c98245e03b.tar Essentials-e2024ca2b63112cbb343812e4d4354c98245e03b.tar.gz Essentials-e2024ca2b63112cbb343812e4d4354c98245e03b.tar.lz Essentials-e2024ca2b63112cbb343812e4d4354c98245e03b.tar.xz Essentials-e2024ca2b63112cbb343812e4d4354c98245e03b.zip |
- Invalid groups assigned to players in users.yml will no longer cause
a crash. GM will now set them to the default group instead.
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder')
-rw-r--r--[-rwxr-xr-x] | EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java index 1331a92ad..ae68e03cc 100755..100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java @@ -630,7 +630,9 @@ public class WorldDataHolder { if (thisUserNode.get("group") != null) { Group hisGroup = ph.getGroup(thisUserNode.get("group").toString()); if (hisGroup == null) { - throw new IllegalArgumentException("There is no group " + thisUserNode.get("group").toString() + ", as stated for player " + thisUser.getName()); + GroupManager.logger.warning("There is no group " + thisUserNode.get("group").toString() + ", as stated for player " + thisUser.getName() + ": Set to '" + ph.getDefaultGroup().getName() + "'."); + hisGroup = ph.defaultGroup; + //throw new IllegalArgumentException("There is no group " + thisUserNode.get("group").toString() + ", as stated for player " + thisUser.getName()); } thisUser.setGroup(hisGroup); } else { |