fix protocol name
This commit is contained in:
@@ -13,12 +13,14 @@ import mc.core.network.SCPacket;
|
||||
@Setter
|
||||
@ToString
|
||||
public class StatusResponsePacket implements SCPacket {
|
||||
public static final String NAME = "1.12.2";
|
||||
public static final int PROTOCOL = 340;
|
||||
private static final JsonObject versionObj;
|
||||
|
||||
static {
|
||||
versionObj = new JsonObject();
|
||||
versionObj.addProperty("name", "1.12.2");
|
||||
versionObj.addProperty("protocol", 340);
|
||||
versionObj.addProperty("name", NAME);
|
||||
versionObj.addProperty("protocol", PROTOCOL);
|
||||
}
|
||||
|
||||
private int maxOnline;
|
||||
|
||||
@@ -17,6 +17,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import mc.core.network.Server;
|
||||
import mc.core.network.StartServerException;
|
||||
import mc.core.network.proto_1_12_2.State;
|
||||
import mc.core.network.proto_1_12_2.packets.StatusResponsePacket;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
@@ -58,7 +59,7 @@ public class NettyServer implements Server {
|
||||
|
||||
@Override
|
||||
public void start() throws StartServerException {
|
||||
log.info("Use protocol 1.7.10");
|
||||
log.info("Use protocol {}", StatusResponsePacket.NAME);
|
||||
bossGroup = new NioEventLoopGroup(1);
|
||||
workerGroup = new NioEventLoopGroup(workerGroupCount);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user