This commit is contained in:
Norbi Peti 2016-12-01 22:06:25 +01:00
parent ebf862e54a
commit 4b44283236

View file

@ -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);