Behave!
This commit is contained in:
parent
ebf862e54a
commit
4b44283236
1 changed files with 3 additions and 3 deletions
|
@ -44,13 +44,13 @@ public class MCChatListener implements Listener, IListener<MessageReceivedEvent>
|
|||
{ // TODO
|
||||
// Execute as ingame player
|
||||
} else {
|
||||
if (Arrays.stream(UnconnectedCmds).anyMatch(s -> cmd.startsWith(s))) {
|
||||
if (!Arrays.stream(UnconnectedCmds).anyMatch(s -> cmd.startsWith(s))) {
|
||||
// Command not whitelisted
|
||||
DiscordPlugin.sendMessageToChannel(event.getMessage().getChannel(), // TODO
|
||||
"Sorry, you don't have your accounts connected (or you have, this part doesn't work yet), you can only access these commands:\n"
|
||||
+ Arrays.toString(UnconnectedCmds));
|
||||
}
|
||||
Bukkit.dispatchCommand(dsender, cmd);
|
||||
} else
|
||||
Bukkit.dispatchCommand(dsender, cmd);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
TBMCCoreAPI.SendException("An error occured while executing command " + cmd + "!", e);
|
||||
|
|
Loading…
Reference in a new issue