forked from SteamWar/SteamWar
Add debug output to TinyProtocol
This commit is contained in:
@@ -423,6 +423,7 @@ public class TinyProtocol {
|
||||
*/
|
||||
public final void close() {
|
||||
if (!closed) {
|
||||
System.out.println("Close TinyProtocol");
|
||||
closed = true;
|
||||
|
||||
// Remove our handlers
|
||||
|
||||
@@ -24,7 +24,6 @@ import de.steamwar.Reflection;
|
||||
import de.steamwar.sql.internal.Statement;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.server.network.ServerConnectionListener;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
@@ -112,7 +111,6 @@ class CheckpointUtilsJ9 {
|
||||
ServerConnectionListener serverConnection = MinecraftServer.getServer().getConnection();
|
||||
List<?> channels = channelFutures.get(serverConnection);
|
||||
for (Object future : channels) {
|
||||
System.out.println(((ChannelFuture) future).channel() + ": " + ((ChannelFuture) future).channel().pipeline().names());
|
||||
((ChannelFuture) future).channel().close().syncUninterruptibly();
|
||||
}
|
||||
channels.clear();
|
||||
@@ -148,15 +146,10 @@ class CheckpointUtilsJ9 {
|
||||
// Reopen socket
|
||||
serverConnection.startTcpServerListener(InetAddress.getLoopbackAddress(), port);
|
||||
for (Object future : channels) {
|
||||
System.out.println(((ChannelFuture) future).channel() + ": " + ((ChannelFuture) future).channel().pipeline().names());
|
||||
((ChannelFuture) future).channel().config().setAutoRead(true);
|
||||
}
|
||||
|
||||
Bukkit.getPluginManager().callEvent(new CRIUWakeupEvent());
|
||||
Core.getInstance().getLogger().log(Level.INFO, "Checkpoint restored");
|
||||
|
||||
for (ServerPlayer player : MinecraftServer.getServer().getPlayerList().players) {
|
||||
System.out.println(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user