From aa74e02f9f6ea745f8a3d1e17a66ed38bf4e1036 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Sun, 5 Jun 2016 23:52:35 +0200 Subject: [PATCH] Don't start an announcer task if there are no scripts --- src/main/java/io/github/dre2n/dungeonsxl/DungeonsXL.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/dre2n/dungeonsxl/DungeonsXL.java b/src/main/java/io/github/dre2n/dungeonsxl/DungeonsXL.java index 97db9cc1..546a0266 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/DungeonsXL.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/DungeonsXL.java @@ -606,7 +606,9 @@ public class DungeonsXL extends BRPlugin { * start a new AnnouncerTask */ public void startAnnouncerTask(long period) { - announcerTask = new AnnouncerTask(announcers).runTaskTimer(this, 0L, period); + if (!announcers.getAnnouncers().isEmpty()) { + announcerTask = new AnnouncerTask(announcers).runTaskTimer(this, 0L, period); + } } /**