From 9df58ba9f68a34d08fd8d9a725024f5b9c255dd7 Mon Sep 17 00:00:00 2001 From: Pepich Date: Tue, 7 Feb 2017 20:32:00 +0100 Subject: [PATCH] Fixed NPE in chatgroups --- src/com/redstoner/modules/chatgroups/Chatgroups.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/redstoner/modules/chatgroups/Chatgroups.java b/src/com/redstoner/modules/chatgroups/Chatgroups.java index 2142cdc..2ee0ee0 100644 --- a/src/com/redstoner/modules/chatgroups/Chatgroups.java +++ b/src/com/redstoner/modules/chatgroups/Chatgroups.java @@ -26,7 +26,7 @@ import com.redstoner.modules.Module; * * @author Pepich */ @AutoRegisterListener -@Version(major = 1, minor = 2, revision = 0, compatible = 1) +@Version(major = 1, minor = 2, revision = 1, compatible = 1) public class Chatgroups implements Module, Listener { private static final char defaultKey = ':'; @@ -345,7 +345,11 @@ public class Chatgroups implements Module, Listener @Override public boolean sendTo(CommandSender recipient) { - return getGroup(recipient).equals(group); + String rgroup = getGroup(recipient); + if (rgroup != null) + return rgroup.equals(group); + else + return false; } }); if (!getGroup(Bukkit.getConsoleSender()).equals(group))