mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-19 13:54:45 +08:00
fix event
This commit is contained in:
parent
35f3d0ca70
commit
88ffeb5a3b
@ -74,5 +74,4 @@ public class MiraiEventHook<T extends MiraiEvent> {
|
||||
return this.valid.test((T)event);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -3,4 +3,5 @@ package net.mamoe.mirai.event.events.server;
|
||||
import net.mamoe.mirai.event.events.MiraiEvent;
|
||||
|
||||
public class ServerDisableEvent extends MiraiEvent {
|
||||
|
||||
}
|
||||
|
@ -4,4 +4,5 @@ import net.mamoe.mirai.event.events.MiraiEvent;
|
||||
|
||||
public class ServerEnableEvent extends MiraiEvent {
|
||||
|
||||
|
||||
}
|
||||
|
@ -7,4 +7,12 @@ public interface MiraiTaskExceptionHandler {
|
||||
static MiraiTaskExceptionHandler byDefault(){
|
||||
return Throwable::printStackTrace;
|
||||
}
|
||||
|
||||
static MiraiTaskExceptionHandler byIgnore(){
|
||||
return a -> {};
|
||||
}
|
||||
|
||||
static MiraiTaskExceptionHandler byPrint(){
|
||||
return Throwable::printStackTrace;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -25,5 +25,4 @@ public class MiraiThreadPool extends ThreadPoolExecutor implements Closeable {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user