Fix NPE in AdminCommand from IncognitoManager being null
This commit is contained in:
parent
4477a215f4
commit
e46798f20e
@ -94,7 +94,7 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
|
||||
addCommand(new AnnounceCommand(this));
|
||||
//addCommand(new GlobalCommand(this));
|
||||
|
||||
addCommand(new AdminCommand(this, _incognitoManager));
|
||||
addCommand(new AdminCommand(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -616,4 +616,9 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IncognitoManager getIncognitoManager()
|
||||
{
|
||||
return _incognitoManager;
|
||||
}
|
||||
}
|
||||
|
@ -14,13 +14,9 @@ import mineplex.core.message.MessageManager;
|
||||
|
||||
public class AdminCommand extends CommandBase<MessageManager>
|
||||
{
|
||||
private IncognitoManager _incognitoManager;
|
||||
|
||||
public AdminCommand(MessageManager plugin, IncognitoManager incognitoManager)
|
||||
public AdminCommand(MessageManager plugin)
|
||||
{
|
||||
super(plugin, Rank.ALL, "a","admin");
|
||||
|
||||
_incognitoManager = incognitoManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -55,7 +51,7 @@ public class AdminCommand extends CommandBase<MessageManager>
|
||||
{
|
||||
if (Plugin.GetClientManager().Get(to).GetRank().has(Rank.HELPER))
|
||||
{
|
||||
if (_incognitoManager.Get(to).Status)
|
||||
if (Plugin.getIncognitoManager().Get(to).Status)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user