Fixed NPE in chatgroups
This commit is contained in:
parent
96b36219e4
commit
9df58ba9f6
@ -26,7 +26,7 @@ import com.redstoner.modules.Module;
|
|||||||
*
|
*
|
||||||
* @author Pepich */
|
* @author Pepich */
|
||||||
@AutoRegisterListener
|
@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
|
public class Chatgroups implements Module, Listener
|
||||||
{
|
{
|
||||||
private static final char defaultKey = ':';
|
private static final char defaultKey = ':';
|
||||||
@ -345,7 +345,11 @@ public class Chatgroups implements Module, Listener
|
|||||||
@Override
|
@Override
|
||||||
public boolean sendTo(CommandSender recipient)
|
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))
|
if (!getGroup(Bukkit.getConsoleSender()).equals(group))
|
||||||
|
Reference in New Issue
Block a user