Added message for testing
This commit is contained in:
parent
20d6cd7313
commit
7de50eb00d
2 changed files with 4 additions and 1 deletions
|
@ -207,7 +207,8 @@ public class DiscordPlugin extends JavaPlugin implements IListener<ReadyEvent> {
|
|||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
return channel.sendMessage(message);
|
||||
return channel
|
||||
.sendMessage(Test ? "*The following message is from a test server*\n" + message : message);
|
||||
} catch (Exception e) {
|
||||
if (i == 9) {
|
||||
Bukkit.getLogger().warning("Failed to deliver message to Discord! Channel: " + channel.getName()
|
||||
|
|
|
@ -20,6 +20,8 @@ public class MCChatListener implements Listener, IListener<MessageReceivedEvent>
|
|||
|
||||
@Override
|
||||
public void handle(MessageReceivedEvent event) {
|
||||
if (event.getMessage().getAuthor().isBot())
|
||||
return;
|
||||
if (event.getMessage().getChannel().getID().equals(DiscordPlugin.chatchannel.getID()))
|
||||
TBMCChatAPI.SendChatMessage(Channel.GlobalChat, Bukkit.getConsoleSender(), event.getMessage().getContent());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue