No players, no announcements
Not broadcasting announcements if nobody is online (mainly because of Discord)
This commit is contained in:
parent
fd72e2de91
commit
cf8af73ed0
1 changed files with 1 additions and 0 deletions
|
@ -13,6 +13,7 @@ public class AnnouncerThread implements Runnable {
|
|||
} catch (InterruptedException ex) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
if (Bukkit.getOnlinePlayers().size() == 0) continue; //Don't post to Discord if nobody is on
|
||||
if (PluginMain.AnnounceMessages.size() > AnnounceMessageIndex) {
|
||||
Bukkit.broadcastMessage(PluginMain.AnnounceMessages.get(AnnounceMessageIndex));
|
||||
AnnounceMessageIndex++;
|
||||
|
|
Loading…
Reference in a new issue