From 0cd57d17f2c4f6cfea665328e7cdd8e786873d6e Mon Sep 17 00:00:00 2001 From: Goh Wei Wen Date: Sun, 14 Jun 2020 22:01:33 +0800 Subject: [PATCH] Disable announcer when interval <= 0 --- .../java/de/erethon/dungeonsxl/announcer/AnnouncerCache.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerCache.java b/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerCache.java index 686a4866..0fe59d7d 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerCache.java +++ b/core/src/main/java/de/erethon/dungeonsxl/announcer/AnnouncerCache.java @@ -46,7 +46,7 @@ public class AnnouncerCache { for (File file : folder.listFiles()) { addAnnouncer(new Announcer(plugin, file)); } - if (!announcers.isEmpty()) { + if (!announcers.isEmpty() && plugin.getMainConfig().getAnnouncmentInterval() > 0) { new AnnouncerTask(plugin).runTaskTimer(plugin, plugin.getMainConfig().getAnnouncmentInterval(), plugin.getMainConfig().getAnnouncmentInterval()); } Bukkit.getPluginManager().registerEvents(new AnnouncerListener(plugin), plugin);