mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-19 16:49:15 +08:00
GC
This commit is contained in:
parent
1ce386e80d
commit
87fe5206e9
@ -6,10 +6,12 @@ import net.mamoe.mirai.event.events.Cancellable;
|
|||||||
import net.mamoe.mirai.event.events.MiraiEvent;
|
import net.mamoe.mirai.event.events.MiraiEvent;
|
||||||
import net.mamoe.mirai.event.events.server.ServerDisableEvent;
|
import net.mamoe.mirai.event.events.server.ServerDisableEvent;
|
||||||
|
|
||||||
|
import java.io.Closeable;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
public class MiraiEventHook<T extends MiraiEvent> {
|
public class MiraiEventHook<T extends MiraiEvent> implements Closeable {
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
Class<T> eventClass;
|
Class<T> eventClass;
|
||||||
@ -98,5 +100,9 @@ public class MiraiEventHook<T extends MiraiEvent> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close(){
|
||||||
|
this.handler = null;
|
||||||
|
this.valid = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user