From a8f3155fc50d23ec70454c174fbe1af079f00362 Mon Sep 17 00:00:00 2001 From: games647 Date: Mon, 25 Jul 2022 11:19:31 +0200 Subject: [PATCH] Add experimental synchronous processing --- .../bukkit/listener/protocollib/ProtocolLibListener.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/ProtocolLibListener.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/ProtocolLibListener.java index 657b60fa..8ba567a2 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/ProtocolLibListener.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/ProtocolLibListener.java @@ -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 super(params() .plugin(plugin) - .types(START, ENCRYPTION_BEGIN) - .optionAsync()); + .types(START, ENCRYPTION_BEGIN)); this.plugin = plugin; 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 // TODO: make synchronous processing, but do web or database requests async ProtocolLibrary.getProtocolManager() - .getAsynchronousManager() - .registerAsyncHandler(new ProtocolLibListener(plugin, antiBotService, verifyClientKeys)) - .start(); + .addPacketListener(new ProtocolLibListener(plugin, antiBotService, verifyClientKeys)); } @Override