package protocolsupport.injector.pe;

import io.netty.channel.Channel;
import raknetserver.pipeline.raknet.RakNetPacketConnectionEstablishHandler.PingHandler;

public class PENetServerConstants {

	public static final PingHandler PING_HANDLER = new PingHandler() {
		@Override
		public String getServerInfo(Channel channel) {
			//TODO: fake pspe packets for ping passthrough
			return String.join(";",
				"MCPE",
				"ProtocolSupportBungeePE",
				String.valueOf(CURRENT_PROTOCOL), POCKET_VERSION,
				"0", "1"
			);
		}
		@Override
		public void executeHandler(Runnable runnable) {
			runnable.run();
		}
	};

	public static final int USER_PACKET_ID = 0xFE;
	public static final int TEST_PORT = 2222;
	public static final int CURRENT_PROTOCOL = 141;
	public static final String POCKET_VERSION = "1.2.5.15";

}

@@ -64,16 +64,60 @@
 hannel;%0A
+import protocolsupport.api.ProtocolVersion;%0A
 import r
@@ -502,32 +502,52 @@
 valueOf(
-CURRENT_PROTOCOL
+ProtocolVersion.MINECRAFT_PE.getId()
 ), POCKE
@@ -722,100 +722,8 @@
 FE;%0A
-%09public static final int TEST_PORT = 2222;%0A%09public static final int CURRENT_PROTOCOL = 141;%0A
 %09pub
@@ -772,12 +772,9 @@
 1.2.
-5.15
+6
 %22;%0A%0A

Update pe net server constants