mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-30 02:37:34 +02:00
Add experimental synchronous processing
This commit is contained in:
@ -79,8 +79,7 @@ public class ProtocolLibListener extends PacketAdapter {
|
|||||||
//run async in order to not block the server, because we are making api calls to Mojang
|
//run async in order to not block the server, because we are making api calls to Mojang
|
||||||
super(params()
|
super(params()
|
||||||
.plugin(plugin)
|
.plugin(plugin)
|
||||||
.types(START, ENCRYPTION_BEGIN)
|
.types(START, ENCRYPTION_BEGIN));
|
||||||
.optionAsync());
|
|
||||||
|
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
this.antiBotService = antiBotService;
|
this.antiBotService = antiBotService;
|
||||||
@ -91,9 +90,7 @@ public class ProtocolLibListener extends PacketAdapter {
|
|||||||
// they will be created with a static builder, because otherwise it will throw a NoClassDefFoundError
|
// they will be created with a static builder, because otherwise it will throw a NoClassDefFoundError
|
||||||
// TODO: make synchronous processing, but do web or database requests async
|
// TODO: make synchronous processing, but do web or database requests async
|
||||||
ProtocolLibrary.getProtocolManager()
|
ProtocolLibrary.getProtocolManager()
|
||||||
.getAsynchronousManager()
|
.addPacketListener(new ProtocolLibListener(plugin, antiBotService, verifyClientKeys));
|
||||||
.registerAsyncHandler(new ProtocolLibListener(plugin, antiBotService, verifyClientKeys))
|
|
||||||
.start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user