Fixed command whitelist...
This commit is contained in:
parent
28f3f52b83
commit
2108ce2347
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ public class MCChatListener implements Listener, IListener<MessageReceivedEvent>
|
||||||
}
|
}
|
||||||
if (event.getMessage().getContent().startsWith("/")) {
|
if (event.getMessage().getContent().startsWith("/")) {
|
||||||
final String cmd = event.getMessage().getContent().substring(1);
|
final String cmd = event.getMessage().getContent().substring(1);
|
||||||
if (!player.isPresent() && !Arrays.stream(UnconnectedCmds).anyMatch(s -> cmd.startsWith(s))) {
|
if (!player.isPresent() && !Arrays.stream(UnconnectedCmds).anyMatch(s -> cmd.startsWith(s + " "))) {
|
||||||
// Command not whitelisted
|
// Command not whitelisted
|
||||||
DiscordPlugin.sendMessageToChannel(event.getMessage().getChannel(), // TODO
|
DiscordPlugin.sendMessageToChannel(event.getMessage().getChannel(), // TODO
|
||||||
"Sorry, you need to be online on the server and have your accounts connected, you can only access these commands:\n"
|
"Sorry, you need to be online on the server and have your accounts connected, you can only access these commands:\n"
|
||||||
|
|
Loading…
Reference in a new issue