Fix TSchedule

This commit is contained in:
坏黑 2019-07-12 00:09:47 +08:00
parent b433c54ad8
commit 81608eb649

View File

@ -22,7 +22,7 @@ public class TScheduleLoader implements TabooLibLoader.Loader {
static Map<String, List<TScheduleData>> schedules = Maps.newHashMap(); static Map<String, List<TScheduleData>> schedules = Maps.newHashMap();
public static void run(Plugin plugin) { public static void run(Plugin plugin) {
List<TScheduleData> list = schedules.get(plugin.getName()); List<TScheduleData> list = schedules.remove(plugin.getName());
if (list != null) { if (list != null) {
list.forEach(data -> run(plugin, data.getRunnable(), data.getAnnotation().delay(), data.getAnnotation().period(), data.getAnnotation().async())); list.forEach(data -> run(plugin, data.getRunnable(), data.getAnnotation().delay(), data.getAnnotation().period(), data.getAnnotation().async()));
} }