diff options
author | t00thpick1 <t00thpick1dirko@gmail.com> | 2013-12-19 15:25:22 -0500 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2013-12-20 23:37:56 -0600 |
commit | 624603cd41aabb3a40e4b74dbc089e78401d81f6 (patch) | |
tree | 47a63c3eb36a3416634c08051860a72984ef3ab5 /src/main/java/net | |
parent | dfcff7eabf5937fa66b6115c866a3ad14a2cf9ce (diff) | |
download | craftbukkit-624603cd41aabb3a40e4b74dbc089e78401d81f6.tar craftbukkit-624603cd41aabb3a40e4b74dbc089e78401d81f6.tar.gz craftbukkit-624603cd41aabb3a40e4b74dbc089e78401d81f6.tar.lz craftbukkit-624603cd41aabb3a40e4b74dbc089e78401d81f6.tar.xz craftbukkit-624603cd41aabb3a40e4b74dbc089e78401d81f6.zip |
[Bleeding] Send short version string on ping. Addresses BUKKIT-5206
With the update in 1.7 that improved the server ping, it was made to
include a long version string for CraftBukkit. This value is too long
for proper display so we now send a shortened string consisting of
the server implementation and the minecraft version.
Diffstat (limited to 'src/main/java/net')
-rw-r--r-- | src/main/java/net/minecraft/server/MinecraftServer.java | 2 | ||||
-rw-r--r-- | src/main/java/net/minecraft/server/PacketStatusListener.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index c78e47bd..6a019829 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -899,7 +899,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo } public String getServerModName() { - return "craftbukkit"; // CraftBukkit - cb > vanilla! + return server.getName(); // CraftBukkit - cb > vanilla! } public CrashReport b(CrashReport crashreport) { diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java index e4116e5e..ebb9d533 100644 --- a/src/main/java/net/minecraft/server/PacketStatusListener.java +++ b/src/main/java/net/minecraft/server/PacketStatusListener.java @@ -50,7 +50,7 @@ public class PacketStatusListener implements PacketStatusInListener { ping.setFavicon(event.icon.value); ping.setMOTD(new ChatComponentText(event.getMotd())); ping.setPlayerSample(new ServerPingPlayerSample(event.getMaxPlayers(), minecraftServer.getPlayerList().getPlayerCount())); - ping.setServerInfo(new ServerPingServerData(minecraftServer.server.getVersion(), 4)); // MAGICAL VALUE FROM MinecraftServer + ping.setServerInfo(new ServerPingServerData(minecraftServer.getServerModName() + " " + minecraftServer.getVersion(), 4)); // TODO: Update when protocol changes this.networkManager.handle(new PacketStatusOutServerInfo(ping), new GenericFutureListener[0]); // CraftBukkit end |