diff options
author | Nate Mortensen <nate.richard.mortensen@gmail.com> | 2014-04-15 20:45:03 -0600 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2014-04-17 13:44:03 -0500 |
commit | 7e54acc8bd267a64902fbf260422c984bc7846c0 (patch) | |
tree | 2ce4ed6f33611eee6ffc4ef76c6f861b40345881 /src/main/java | |
parent | 98555224aaee83601bda2906aa53f05d91926c78 (diff) | |
download | craftbukkit-7e54acc8bd267a64902fbf260422c984bc7846c0.tar craftbukkit-7e54acc8bd267a64902fbf260422c984bc7846c0.tar.gz craftbukkit-7e54acc8bd267a64902fbf260422c984bc7846c0.tar.lz craftbukkit-7e54acc8bd267a64902fbf260422c984bc7846c0.tar.xz craftbukkit-7e54acc8bd267a64902fbf260422c984bc7846c0.zip |
Update CraftBukkit to Minecraft 1.7.9
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) { |