Don't start an announcer task if there are no scripts

This commit is contained in:
Daniel Saukel 2016-06-05 23:52:35 +02:00
parent 275cba0799
commit aa74e02f9f

View File

@ -606,8 +606,10 @@ public class DungeonsXL extends BRPlugin {
* start a new AnnouncerTask
*/
public void startAnnouncerTask(long period) {
if (!announcers.getAnnouncers().isEmpty()) {
announcerTask = new AnnouncerTask(announcers).runTaskTimer(this, 0L, period);
}
}
/**
* @return the AnnouncerTask