diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/net/hypixel/modapi/forge/ForgeModAPI.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/net/hypixel/modapi/forge/ForgeModAPI.java b/src/main/java/net/hypixel/modapi/forge/ForgeModAPI.java index 16a75ef..1a15da3 100644 --- a/src/main/java/net/hypixel/modapi/forge/ForgeModAPI.java +++ b/src/main/java/net/hypixel/modapi/forge/ForgeModAPI.java @@ -86,11 +86,13 @@ public class ForgeModAPI { return; } - try { - HypixelModAPI.getInstance().handle(identifier, new PacketSerializer(packet.getBufferData())); - } catch (Exception e) { - LOGGER.log(Level.WARNING, "Failed to handle packet " + identifier, e); - } + Minecraft.getMinecraft().addScheduledTask(() -> { + try { + HypixelModAPI.getInstance().handle(identifier, new PacketSerializer(packet.getBufferData())); + } catch (Exception e) { + LOGGER.log(Level.WARNING, "Failed to handle packet " + identifier, e); + } + }); } } } |