Reformatted using IntelliJ
This commit is contained in:
@@ -72,10 +72,10 @@ public final class ProtocolBridge {
|
||||
/**
|
||||
* Initialize the ProtocolBridge instance for the client side
|
||||
*
|
||||
* @param protocolServer The ProtocolCustomServer instance
|
||||
* @param protocolValues The ProtocolSettings instance
|
||||
* @param protocolVersion The ProtocolVersion instance
|
||||
* @param logFolder The folder to store the log files
|
||||
* @param protocolServer The ProtocolCustomServer instance
|
||||
* @param protocolValues The ProtocolSettings instance
|
||||
* @param protocolVersion The ProtocolVersion instance
|
||||
* @param logFolder The folder to store the log files
|
||||
* @throws Exception if an error occurs while initializing the ProtocolBridge
|
||||
*/
|
||||
public ProtocolBridge(ProtocolCustomServer protocolServer, ProtocolValues protocolValues, ProtocolVersion protocolVersion, File logFolder) throws Exception {
|
||||
@@ -101,10 +101,10 @@ public final class ProtocolBridge {
|
||||
/**
|
||||
* Initialize the ProtocolBridge instance for the client side
|
||||
*
|
||||
* @param protocolClient The ProtocolClient instance
|
||||
* @param protocolValues The ProtocolSettings instance
|
||||
* @param protocolVersion The ProtocolVersion instance
|
||||
* @param logFolder The folder to store the log files
|
||||
* @param protocolClient The ProtocolClient instance
|
||||
* @param protocolValues The ProtocolSettings instance
|
||||
* @param protocolVersion The ProtocolVersion instance
|
||||
* @param logFolder The folder to store the log files
|
||||
* @throws Exception if an error occurs while initializing the ProtocolBridge
|
||||
*/
|
||||
@ProtocolInfo(protocolSide = ProtocolVersion.ProtocolSide.CLIENT)
|
||||
@@ -130,14 +130,21 @@ public final class ProtocolBridge {
|
||||
*/
|
||||
private void registerPackets() {
|
||||
// 1.0.0-BETA packets
|
||||
if (isPacketSupported(new AuthPacket(this))) protocolValues.packetHandler.registerPacket(() -> new AuthPacket(this));
|
||||
if (isPacketSupported(new AuthPacket(this)))
|
||||
protocolValues.packetHandler.registerPacket(() -> new AuthPacket(this));
|
||||
if (isPacketSupported(new INSQueryPacket())) protocolValues.packetHandler.registerPacket(INSQueryPacket::new);
|
||||
if (isPacketSupported(new INSResponsePacket(this))) protocolValues.packetHandler.registerPacket(() -> new INSResponsePacket(this));
|
||||
if (isPacketSupported(new WebRequestPacket())) protocolValues.packetHandler.registerPacket(WebRequestPacket::new);
|
||||
if (isPacketSupported(new WebResponsePacket())) protocolValues.packetHandler.registerPacket(WebResponsePacket::new);
|
||||
if (isPacketSupported(new WebStreamChunkPacket())) protocolValues.packetHandler.registerPacket(WebStreamChunkPacket::new);
|
||||
if (isPacketSupported(new WebStreamStartPacket())) protocolValues.packetHandler.registerPacket(WebStreamStartPacket::new);
|
||||
if (isPacketSupported(new WebStreamEndPacket())) protocolValues.packetHandler.registerPacket(WebStreamEndPacket::new);
|
||||
if (isPacketSupported(new INSResponsePacket(this)))
|
||||
protocolValues.packetHandler.registerPacket(() -> new INSResponsePacket(this));
|
||||
if (isPacketSupported(new WebRequestPacket()))
|
||||
protocolValues.packetHandler.registerPacket(WebRequestPacket::new);
|
||||
if (isPacketSupported(new WebResponsePacket()))
|
||||
protocolValues.packetHandler.registerPacket(WebResponsePacket::new);
|
||||
if (isPacketSupported(new WebStreamChunkPacket()))
|
||||
protocolValues.packetHandler.registerPacket(WebStreamChunkPacket::new);
|
||||
if (isPacketSupported(new WebStreamStartPacket()))
|
||||
protocolValues.packetHandler.registerPacket(WebStreamStartPacket::new);
|
||||
if (isPacketSupported(new WebStreamEndPacket()))
|
||||
protocolValues.packetHandler.registerPacket(WebStreamEndPacket::new);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user