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
|
{ // TODO
|
||||||
// Execute as ingame player
|
// Execute as ingame player
|
||||||
} else {
|
} else {
|
||||||
if (Arrays.stream(UnconnectedCmds).anyMatch(s -> cmd.startsWith(s))) {
|
if (!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 don't have your accounts connected (or you have, this part doesn't work yet), you can only access these commands:\n"
|
"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));
|
+ Arrays.toString(UnconnectedCmds));
|
||||||
}
|
} else
|
||||||
Bukkit.dispatchCommand(dsender, cmd);
|
Bukkit.dispatchCommand(dsender, cmd);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
TBMCCoreAPI.SendException("An error occured while executing command " + cmd + "!", e);
|
TBMCCoreAPI.SendException("An error occured while executing command " + cmd + "!", e);
|
||||||
|
|
Loading…
Reference in a new issue