mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-07 16:40:43 +08:00
thread-pool
This commit is contained in:
parent
5383194db1
commit
2f96338107
@ -1,6 +1,10 @@
|
||||
package net.mamoe.mirai;
|
||||
|
||||
|
||||
import net.mamoe.mirai.event.MiraiEventHook;
|
||||
import net.mamoe.mirai.event.MiraiEventManager;
|
||||
import net.mamoe.mirai.event.events.qq.FriendMessageEvent;
|
||||
|
||||
/**
|
||||
* @author Him188moe
|
||||
*/
|
||||
|
@ -95,6 +95,11 @@ public class MiraiEventHook<T extends MiraiEvent> implements Closeable {
|
||||
MiraiEventManager.getInstance().registerHook(this);
|
||||
}
|
||||
|
||||
public void mountAlways(){
|
||||
if(this.handler == null)this.handler = a -> {};
|
||||
MiraiEventManager.getInstance().hookAlways(this);
|
||||
}
|
||||
|
||||
public void mountOnce(){
|
||||
if(this.handler == null)this.handler = a -> {};
|
||||
MiraiEventManager.getInstance().hookOnce(this);
|
||||
|
@ -7,8 +7,8 @@ import java.io.IOException;
|
||||
|
||||
public class ImageOutputTest {
|
||||
public static void main(String[] args) throws IOException {
|
||||
BufferedImage image = ImageIO.read(new File((System.getProperty("user.dir") + "/VerificationCode.png").replace("//","/")));
|
||||
CharImageConverter charImageConvertor = new CharImageConverter(image,100);
|
||||
BufferedImage image = ImageIO.read(new File((System.getProperty("user.dir") + "/mirai.png").replace("//","/")));
|
||||
CharImageConverter charImageConvertor = new CharImageConverter(image,80);
|
||||
System.out.println(charImageConvertor.call());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user