Keep CraftServer init early, but make plugins load at approx the same time they do in CraftBukkit - thanks @aadnk for wanting this

By: md_5 <md_5@live.com.au>
This commit is contained in:
Spigot
2013-07-07 09:33:34 +10:00
parent 1734cc8ec7
commit 9cf9dc4d30
2 changed files with 30 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
From 4debe5689ac410f15a6f4757a3a32854a86c9732 Mon Sep 17 00:00:00 2001
From ee34b94e8d33a76135afca40f9331fc1868e2300 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 2 Jul 2013 09:06:29 +1000
Subject: [PATCH] Netty
@@ -1373,7 +1373,7 @@ index 0000000..965ba12
+}
diff --git a/src/main/java/org/spigotmc/netty/PacketWriter.java b/src/main/java/org/spigotmc/netty/PacketWriter.java
new file mode 100644
index 0000000..52c7d7b
index 0000000..50f59ed
--- /dev/null
+++ b/src/main/java/org/spigotmc/netty/PacketWriter.java
@@ -0,0 +1,85 @@
@@ -1385,8 +1385,8 @@ index 0000000..52c7d7b
+import io.netty.handler.codec.EncoderException;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ArrayDeque;
+import java.util.Queue;
+import net.minecraft.server.Packet;
+import net.minecraft.server.PendingConnection;
+
@@ -1400,7 +1400,7 @@ index 0000000..52c7d7b
+ private static final int FLUSH_TIME = 1;
+ /*========================================================================*/
+ long lastFlush;
+ private final List<Packet> queue = new ArrayList<Packet>();
+ private final Queue<Packet> queue = new ArrayDeque<Packet>( 64 );
+
+ void write(Channel channel, NettyNetworkManager networkManager, Packet msg)
+ {