diff options
Diffstat (limited to 'src/main/java')
4 files changed, 15 insertions, 6 deletions
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java index 9cef53fa..f1caa385 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -67,7 +67,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true)); // CraftBukkit end - i.info("Starting minecraft server version 1.7.8"); + i.info("Starting minecraft server version 1.7.9"); if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) { i.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\""); } diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java index 17e69dbc..9cc95812 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java +++ b/src/main/java/net/minecraft/server/HandshakeListener.java @@ -64,11 +64,11 @@ public class HandshakeListener implements PacketHandshakingInListener { // CraftBukkit end if (packethandshakinginsetprotocol.d() > 5) { - chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.7.8"); + chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.7.9"); this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext), new GenericFutureListener[0]); this.b.close(chatcomponenttext); } else if (packethandshakinginsetprotocol.d() < 5) { - chatcomponenttext = new ChatComponentText("Outdated client! Please use 1.7.8"); + chatcomponenttext = new ChatComponentText("Outdated client! Please use 1.7.9"); this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext), new GenericFutureListener[0]); this.b.close(chatcomponenttext); } else { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 00bb455a..f673d64f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -438,7 +438,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo long j = 0L; this.q.setMOTD(new ChatComponentText(this.motd)); - this.q.setServerInfo(new ServerPingServerData("1.7.8", 5)); + this.q.setServerInfo(new ServerPingServerData("1.7.9", 5)); this.a(this.q); while (this.isRunning) { @@ -827,7 +827,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo } public String getVersion() { - return "1.7.8"; + return "1.7.9"; } public int C() { diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java index 1dd22279..1b080c77 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -13,6 +13,7 @@ import net.minecraft.util.io.netty.channel.SimpleChannelInboundHandler; import net.minecraft.util.io.netty.channel.local.LocalChannel; import net.minecraft.util.io.netty.channel.local.LocalServerChannel; import net.minecraft.util.io.netty.channel.nio.NioEventLoopGroup; +import net.minecraft.util.io.netty.handler.timeout.TimeoutException; import net.minecraft.util.io.netty.util.AttributeKey; import net.minecraft.util.io.netty.util.concurrent.GenericFutureListener; import net.minecraft.util.org.apache.commons.lang3.Validate; @@ -66,7 +67,15 @@ public class NetworkManager extends SimpleChannelInboundHandler { } public void exceptionCaught(ChannelHandlerContext channelhandlercontext, Throwable throwable) { - this.close(new ChatMessage("disconnect.genericReason", new Object[] { "Internal Exception: " + throwable})); + ChatMessage chatmessage; + + if (throwable instanceof TimeoutException) { + chatmessage = new ChatMessage("disconnect.timeout", new Object[0]); + } else { + chatmessage = new ChatMessage("disconnect.genericReason", new Object[] { "Internal Exception: " + throwable}); + } + + this.close(chatmessage); } protected void a(ChannelHandlerContext channelhandlercontext, Packet packet) { |