fix State reaction
This commit is contained in:
@@ -44,6 +44,7 @@ public class PacketHandler extends SimpleChannelInboundHandler<CSPacket> {
|
||||
channel.attr(State.ATTR_STATE).set(packet.getNextState());
|
||||
}
|
||||
|
||||
if (packet.getNextState().equals(State.STATUS)) {
|
||||
Config config = Main.appContext.getBean("config", Config.class); //FIXME
|
||||
StatusResponse pkt = new StatusResponse();
|
||||
pkt.setDescription(config.getDescriptionServer());
|
||||
@@ -52,6 +53,7 @@ public class PacketHandler extends SimpleChannelInboundHandler<CSPacket> {
|
||||
|
||||
channel.writeAndFlush(pkt);
|
||||
}
|
||||
}
|
||||
|
||||
public void onPingPacket(Channel channel, PingPacket packet) {
|
||||
channel.writeAndFlush(packet);
|
||||
|
||||
Reference in New Issue
Block a user