From cbee61093e04f3f3fb85fa464d93c75c1ed15827 Mon Sep 17 00:00:00 2001 From: ementalo Date: Wed, 25 Jan 2012 01:09:32 +0000 Subject: Fix exception when getting displayname Fix exception if null values are in settings groups.yml --- Essentials/src/com/earth2me/essentials/settings/Chat.java | 2 +- Essentials/src/com/earth2me/essentials/settings/GroupsHolder.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/settings/Chat.java b/Essentials/src/com/earth2me/essentials/settings/Chat.java index 82a18e051..bbd02ce8e 100644 --- a/Essentials/src/com/earth2me/essentials/settings/Chat.java +++ b/Essentials/src/com/earth2me/essentials/settings/Chat.java @@ -17,7 +17,7 @@ public class Chat implements StorageObject "Disable this if you have any other plugin, that modifies the displayname of a user.", "If it is not set, it will be enabled if EssentialsChat is installed, otherwise not." }) - private Boolean changeDisplayname; + private Boolean changeDisplayname = true; private String displaynameFormat = "{PREFIX}{NICKNAMEPREFIX}{NAME}{SUFFIX}"; @Comment( { diff --git a/Essentials/src/com/earth2me/essentials/settings/GroupsHolder.java b/Essentials/src/com/earth2me/essentials/settings/GroupsHolder.java index 1673b3726..6928b2376 100644 --- a/Essentials/src/com/earth2me/essentials/settings/GroupsHolder.java +++ b/Essentials/src/com/earth2me/essentials/settings/GroupsHolder.java @@ -59,7 +59,10 @@ public class GroupsHolder extends AsyncStorageObjectHolder implements IG { if (player.isAuthorized("essentials.groups." + entry.getKey())) { + if(entry.getValue() != null) + { list.add(entry.getValue()); + } } } return list; -- cgit v1.2.3