From 0c56945ffd2e823bb9ad34782cc078179096b46f Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 5 Jul 2013 19:20:53 +1000 Subject: [PATCH] Implement upcoming Minecraft API to get the server brand - thanks @Grum for the hint. --- proxy/src/main/java/net/md_5/bungee/ServerConnector.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java index 863bbf4d..17d985e2 100644 --- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java +++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java @@ -29,6 +29,7 @@ import net.md_5.bungee.netty.PacketDecoder; import net.md_5.bungee.netty.PacketHandler; import net.md_5.bungee.netty.PipelineUtils; import net.md_5.bungee.protocol.Forge; +import net.md_5.bungee.protocol.MinecraftOutput; import net.md_5.bungee.protocol.packet.DefinedPacket; import net.md_5.bungee.protocol.packet.Packet1Login; import net.md_5.bungee.protocol.packet.Packet9Respawn; @@ -153,6 +154,10 @@ public class ServerConnector extends PacketHandler (byte) user.getPendingConnection().getListener().getTabListSize() ); } user.unsafe().sendPacket( modLogin ); + + MinecraftOutput out = new MinecraftOutput(); + out.writeString( ProxyServer.getInstance().getName() + " (" + ProxyServer.getInstance().getVersion() + ")" ); + user.unsafe().sendPacket( new PacketFAPluginMessage( "MC|Brand", out.toArray() ) ); } else { user.getTabList().onServerChange();