Improved test mode and removed some messages

This commit is contained in:
Norbi Peti 2016-11-05 16:22:19 +01:00
parent e7531fd830
commit f8404c56c5
2 changed files with 8 additions and 4 deletions

View file

@ -48,6 +48,7 @@ public class DiscordPlugin extends JavaPlugin implements IListener<ReadyEvent> {
} else {
lastannouncementtime = getConfig().getLong("lastannouncementtime");
lastseentime = getConfig().getLong("lastseentime");
Test = getConfig().getBoolean("test", true);
}
ClientBuilder cb = new ClientBuilder();
cb.withToken(Files.readFirstLine(new File("TBMC", "Token.txt"), StandardCharsets.UTF_8));
@ -69,7 +70,7 @@ public class DiscordPlugin extends JavaPlugin implements IListener<ReadyEvent> {
public static IChannel genchannel;
public static IChannel issuechannel;
public static final boolean Test = true;
public static boolean Test = true;
@Override
public void handle(ReadyEvent event) {
@ -94,7 +95,7 @@ public class DiscordPlugin extends JavaPlugin implements IListener<ReadyEvent> {
issuechannel = devServer.getChannelByID("239519012529111040"); // bottest
dc.changeStatus(Status.game("testing"));
}
sendMessageToChannel(botchannel, "Minecraft server started up");
//sendMessageToChannel(botchannel, "Minecraft server started up");
Runnable r = new Runnable() {
public void run() {
AnnouncementGetterThreadMethod();

View file

@ -20,8 +20,11 @@ public class MCListener implements Listener {
try {
if (e.getCommand().equalsIgnoreCase("stop"))
DiscordPlugin.sendMessageToChannel(DiscordPlugin.botchannel, "Minecraft server shutting down!");
else if (e.getCommand().equalsIgnoreCase("restart"))
DiscordPlugin.sendMessageToChannel(DiscordPlugin.botchannel, "Minecraft server restarting");
/*
* else if (e.getCommand().equalsIgnoreCase("restart"))
* DiscordPlugin.sendMessageToChannel(DiscordPlugin.botchannel,
* "Minecraft server restarting");
*/
} catch (Exception ex) {
ex.printStackTrace();
}