fix event

This commit is contained in:
liujiahua123123 2019-08-10 12:01:52 +08:00
parent 35f3d0ca70
commit 88ffeb5a3b
6 changed files with 11 additions and 3 deletions

View File

@ -74,5 +74,4 @@ public class MiraiEventHook<T extends MiraiEvent> {
return this.valid.test((T)event);
}
}

View File

@ -3,4 +3,5 @@ package net.mamoe.mirai.event.events.server;
import net.mamoe.mirai.event.events.MiraiEvent;
public class ServerDisableEvent extends MiraiEvent {
}

View File

@ -4,4 +4,5 @@ import net.mamoe.mirai.event.events.MiraiEvent;
public class ServerEnableEvent extends MiraiEvent {
}

View File

@ -7,4 +7,12 @@ public interface MiraiTaskExceptionHandler {
static MiraiTaskExceptionHandler byDefault(){
return Throwable::printStackTrace;
}
static MiraiTaskExceptionHandler byIgnore(){
return a -> {};
}
static MiraiTaskExceptionHandler byPrint(){
return Throwable::printStackTrace;
}
}

View File

@ -126,7 +126,7 @@ public class MiraiTaskManager {
}).start();
}
public void deleteTask(Runnable runnable, long interval){
public void deletingTask(Runnable runnable, long interval){
new Thread(() -> {
try{
Thread.sleep(interval);

View File

@ -25,5 +25,4 @@ public class MiraiThreadPool extends ThreadPoolExecutor implements Closeable {
}
}
}