diff --git a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java index 2c324f606..35b9a8e9b 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java @@ -48,8 +48,8 @@ import com.velocitypowered.proxy.console.VelocityConsole; import com.velocitypowered.proxy.event.VelocityEventManager; import com.velocitypowered.proxy.network.ConnectionManager; import com.velocitypowered.proxy.network.ProtocolUtils; -import com.velocitypowered.proxy.network.serialization.FaviconSerializer; -import com.velocitypowered.proxy.network.serialization.JavaPlayerIdentitySerializer; +import com.velocitypowered.proxy.network.java.serialization.json.FaviconSerializer; +import com.velocitypowered.proxy.network.java.serialization.json.JavaPlayerIdentitySerializer; import com.velocitypowered.proxy.plugin.VelocityPluginManager; import com.velocitypowered.proxy.scheduler.VelocityScheduler; import com.velocitypowered.proxy.server.ServerMap; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java index fb09e6482..3c549d058 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java @@ -36,16 +36,16 @@ import com.velocitypowered.proxy.VelocityServer; import com.velocitypowered.proxy.connection.client.HandshakeSessionHandler; import com.velocitypowered.proxy.connection.client.LoginSessionHandler; import com.velocitypowered.proxy.connection.client.StatusSessionHandler; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundSetCompressionPacket; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftCipherDecoder; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftCipherEncoder; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftCompressDecoder; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftCompressorAndLengthEncoder; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftDecoder; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftEncoder; +import com.velocitypowered.proxy.network.java.states.ProtocolStates; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundSetCompressionPacket; -import com.velocitypowered.proxy.network.pipeline.MinecraftCipherDecoder; -import com.velocitypowered.proxy.network.pipeline.MinecraftCipherEncoder; -import com.velocitypowered.proxy.network.pipeline.MinecraftCompressDecoder; -import com.velocitypowered.proxy.network.pipeline.MinecraftCompressorAndLengthEncoder; -import com.velocitypowered.proxy.network.pipeline.MinecraftDecoder; -import com.velocitypowered.proxy.network.pipeline.MinecraftEncoder; import com.velocitypowered.proxy.network.registry.protocol.ProtocolRegistry; -import com.velocitypowered.proxy.network.registry.state.ProtocolStates; import com.velocitypowered.proxy.util.except.QuietDecoderException; import io.netty.buffer.ByteBuf; import io.netty.channel.Channel; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftSessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftSessionHandler.java index 29b0631e2..06c8ccca5 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftSessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftSessionHandler.java @@ -17,11 +17,11 @@ package com.velocitypowered.proxy.connection; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import io.netty.buffer.ByteBuf; -public interface MinecraftSessionHandler extends PacketHandler { +public interface MinecraftSessionHandler extends JavaPacketHandler { default boolean beforeHandle() { return false; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendConnectionPhase.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendConnectionPhase.java index 5e176c425..fe6bc3cb0 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendConnectionPhase.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendConnectionPhase.java @@ -19,7 +19,7 @@ package com.velocitypowered.proxy.connection.backend; import com.velocitypowered.proxy.connection.client.ConnectedPlayer; import com.velocitypowered.proxy.connection.forge.legacy.LegacyForgeHandshakeBackendPhase; -import com.velocitypowered.proxy.network.packet.AbstractPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.AbstractPluginMessagePacket; /** * Provides connection phase specific actions. diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendConnectionPhases.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendConnectionPhases.java index 4e12a6ed3..bce695453 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendConnectionPhases.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendConnectionPhases.java @@ -19,7 +19,7 @@ package com.velocitypowered.proxy.connection.backend; import com.velocitypowered.proxy.connection.client.ConnectedPlayer; import com.velocitypowered.proxy.connection.forge.legacy.LegacyForgeHandshakeBackendPhase; -import com.velocitypowered.proxy.network.packet.AbstractPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.AbstractPluginMessagePacket; /** * Contains Vanilla {@link BackendConnectionPhase}s. diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendPlaySessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendPlaySessionHandler.java index 3bc4cc762..424f8233f 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendPlaySessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendPlaySessionHandler.java @@ -34,17 +34,17 @@ import com.velocitypowered.proxy.connection.MinecraftConnection; import com.velocitypowered.proxy.connection.MinecraftSessionHandler; import com.velocitypowered.proxy.connection.client.ClientPlaySessionHandler; import com.velocitypowered.proxy.connection.util.ConnectionMessages; -import com.velocitypowered.proxy.network.PluginMessageUtil; -import com.velocitypowered.proxy.network.packet.AbstractPluginMessagePacket; +import com.velocitypowered.proxy.network.java.PluginMessageUtil; +import com.velocitypowered.proxy.network.java.packet.AbstractPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundAvailableCommandsPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundBossBarPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundDisconnectPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundKeepAlivePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundPlayerListItemPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundTabCompleteResponsePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundPluginMessagePacket; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundAvailableCommandsPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundBossBarPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundDisconnectPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundKeepAlivePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundPlayerListItemPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundPluginMessagePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundTabCompleteResponsePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundPluginMessagePacket; import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufUtil; import io.netty.buffer.Unpooled; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BungeeCordMessageResponder.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BungeeCordMessageResponder.java index 14c12a2a7..79483a548 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BungeeCordMessageResponder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BungeeCordMessageResponder.java @@ -28,8 +28,8 @@ import com.velocitypowered.proxy.connection.MinecraftConnection; import com.velocitypowered.proxy.connection.client.ConnectedPlayer; import com.velocitypowered.proxy.network.buffer.ByteBufDataInput; import com.velocitypowered.proxy.network.buffer.ByteBufDataOutput; -import com.velocitypowered.proxy.network.packet.AbstractPluginMessagePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.AbstractPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundPluginMessagePacket; import com.velocitypowered.proxy.server.VelocityRegisteredServer; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import io.netty.buffer.ByteBuf; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/LoginSessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/LoginSessionHandler.java index cfcfab130..d0bed3285 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/LoginSessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/LoginSessionHandler.java @@ -28,13 +28,13 @@ import com.velocitypowered.proxy.connection.VelocityConstants; import com.velocitypowered.proxy.connection.util.ConnectionRequestResults; import com.velocitypowered.proxy.connection.util.ConnectionRequestResults.Impl; import com.velocitypowered.proxy.network.ProtocolUtils; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundDisconnectPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundEncryptionRequestPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundLoginPluginMessagePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundServerLoginSuccessPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundSetCompressionPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundLoginPluginResponsePacket; -import com.velocitypowered.proxy.network.registry.state.ProtocolStates; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundDisconnectPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundEncryptionRequestPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundLoginPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundServerLoginSuccessPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundSetCompressionPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundLoginPluginResponsePacket; +import com.velocitypowered.proxy.network.java.states.ProtocolStates; import com.velocitypowered.proxy.util.except.QuietRuntimeException; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/TransitionSessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/TransitionSessionHandler.java index b217d106c..842d87ec4 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/TransitionSessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/TransitionSessionHandler.java @@ -31,11 +31,11 @@ import com.velocitypowered.proxy.connection.client.ConnectedPlayer; import com.velocitypowered.proxy.connection.util.ConnectionMessages; import com.velocitypowered.proxy.connection.util.ConnectionRequestResults; import com.velocitypowered.proxy.connection.util.ConnectionRequestResults.Impl; -import com.velocitypowered.proxy.network.PluginMessageUtil; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundDisconnectPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundJoinGamePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundKeepAlivePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundPluginMessagePacket; +import com.velocitypowered.proxy.network.java.PluginMessageUtil; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundDisconnectPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundJoinGamePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundKeepAlivePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundPluginMessagePacket; import java.io.IOException; import java.util.concurrent.CompletableFuture; import org.apache.logging.log4j.LogManager; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/VelocityServerConnection.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/VelocityServerConnection.java index 57b5826f2..379fe6220 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/VelocityServerConnection.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/VelocityServerConnection.java @@ -20,7 +20,7 @@ package com.velocitypowered.proxy.connection.backend; import static com.velocitypowered.proxy.VelocityServer.GENERAL_GSON; import static com.velocitypowered.proxy.connection.forge.legacy.LegacyForgeConstants.HANDSHAKE_HOSTNAME_TOKEN; import static com.velocitypowered.proxy.network.HandlerNames.HANDLER; -import static com.velocitypowered.proxy.network.PluginMessageUtil.channelIdForVersion; +import static com.velocitypowered.proxy.network.java.PluginMessageUtil.channelIdForVersion; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; @@ -40,11 +40,11 @@ import com.velocitypowered.proxy.connection.MinecraftConnectionAssociation; import com.velocitypowered.proxy.connection.client.ConnectedPlayer; import com.velocitypowered.proxy.connection.registry.DimensionRegistry; import com.velocitypowered.proxy.connection.util.ConnectionRequestResults.Impl; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundJoinGamePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundHandshakePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundPluginMessagePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundServerLoginPacket; -import com.velocitypowered.proxy.network.registry.state.ProtocolStates; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundJoinGamePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundHandshakePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundServerLoginPacket; +import com.velocitypowered.proxy.network.java.states.ProtocolStates; import com.velocitypowered.proxy.server.VelocityRegisteredServer; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientConnectionPhase.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientConnectionPhase.java index 8cd9f834c..ff2a259f2 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientConnectionPhase.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientConnectionPhase.java @@ -19,7 +19,7 @@ package com.velocitypowered.proxy.connection.client; import com.velocitypowered.proxy.connection.backend.VelocityServerConnection; import com.velocitypowered.proxy.connection.forge.legacy.LegacyForgeHandshakeClientPhase; -import com.velocitypowered.proxy.network.packet.AbstractPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.AbstractPluginMessagePacket; /** * Provides connection phase specific actions. diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java index fa04fd830..c347664e1 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java @@ -20,7 +20,7 @@ package com.velocitypowered.proxy.connection.client; import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_13; import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_16; import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_8; -import static com.velocitypowered.proxy.network.PluginMessageUtil.constructChannelsPacket; +import static com.velocitypowered.proxy.network.java.PluginMessageUtil.constructChannelsPacket; import com.google.common.base.MoreObjects; import com.google.common.collect.ImmutableList; @@ -41,23 +41,23 @@ import com.velocitypowered.proxy.connection.MinecraftSessionHandler; import com.velocitypowered.proxy.connection.backend.BackendConnectionPhases; import com.velocitypowered.proxy.connection.backend.BungeeCordMessageResponder; import com.velocitypowered.proxy.connection.backend.VelocityServerConnection; -import com.velocitypowered.proxy.network.PluginMessageUtil; -import com.velocitypowered.proxy.network.packet.AbstractPluginMessagePacket; +import com.velocitypowered.proxy.network.java.PluginMessageUtil; +import com.velocitypowered.proxy.network.java.packet.AbstractPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundBossBarPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundJoinGamePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundRespawnPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundTabCompleteResponsePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundTabCompleteResponsePacket.Offer; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundTitlePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundChatPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundClientSettingsPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundKeepAlivePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundResourcePackResponsePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundTabCompleteRequestPacket; +import com.velocitypowered.proxy.network.java.states.ProtocolStates; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundBossBarPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundJoinGamePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundPluginMessagePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundRespawnPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundTabCompleteResponsePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundTabCompleteResponsePacket.Offer; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundTitlePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundChatPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundClientSettingsPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundKeepAlivePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundPluginMessagePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundResourcePackResponsePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundTabCompleteRequestPacket; -import com.velocitypowered.proxy.network.registry.state.ProtocolStates; import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufUtil; import io.netty.buffer.Unpooled; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java index ef160168c..bea6251e8 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java @@ -19,7 +19,7 @@ package com.velocitypowered.proxy.connection.client; import static com.velocitypowered.api.proxy.player.ConnectionRequestBuilder.Status.ALREADY_CONNECTED; import static com.velocitypowered.proxy.connection.util.ConnectionRequestResults.plainResult; -import static com.velocitypowered.proxy.network.PluginMessageUtil.channelIdForVersion; +import static com.velocitypowered.proxy.network.java.PluginMessageUtil.channelIdForVersion; import static java.util.concurrent.CompletableFuture.completedFuture; import com.google.common.base.Preconditions; @@ -57,18 +57,18 @@ import com.velocitypowered.proxy.connection.backend.VelocityServerConnection; import com.velocitypowered.proxy.connection.forge.legacy.LegacyForgeConstants; import com.velocitypowered.proxy.connection.util.ConnectionMessages; import com.velocitypowered.proxy.connection.util.ConnectionRequestResults.Impl; -import com.velocitypowered.proxy.network.PluginMessageUtil; import com.velocitypowered.proxy.network.ProtocolUtils; -import com.velocitypowered.proxy.network.packet.AbstractPluginMessagePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundChatPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundDisconnectPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundKeepAlivePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundPluginMessagePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundResourcePackRequestPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundTitlePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundChatPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundClientSettingsPacket; -import com.velocitypowered.proxy.network.registry.state.ProtocolStates; +import com.velocitypowered.proxy.network.java.PluginMessageUtil; +import com.velocitypowered.proxy.network.java.packet.AbstractPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundChatPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundDisconnectPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundKeepAlivePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundResourcePackRequestPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundTitlePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundChatPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundClientSettingsPacket; +import com.velocitypowered.proxy.network.java.states.ProtocolStates; import com.velocitypowered.proxy.server.VelocityRegisteredServer; import com.velocitypowered.proxy.tablist.VelocityTabList; import com.velocitypowered.proxy.tablist.VelocityTabListLegacy; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/HandshakeSessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/HandshakeSessionHandler.java index f95eb9f22..8b20dc5f2 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/HandshakeSessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/HandshakeSessionHandler.java @@ -29,13 +29,13 @@ import com.velocitypowered.proxy.connection.ConnectionTypes; import com.velocitypowered.proxy.connection.MinecraftConnection; import com.velocitypowered.proxy.connection.MinecraftSessionHandler; import com.velocitypowered.proxy.connection.forge.legacy.LegacyForgeConstants; +import com.velocitypowered.proxy.network.java.packet.legacy.LegacyDisconnectPacket; +import com.velocitypowered.proxy.network.java.packet.legacy.LegacyHandshakePacket; +import com.velocitypowered.proxy.network.java.packet.legacy.LegacyPingPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundHandshakePacket; +import com.velocitypowered.proxy.network.java.states.ProtocolStates; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.legacy.LegacyDisconnectPacket; -import com.velocitypowered.proxy.network.packet.legacy.LegacyHandshakePacket; -import com.velocitypowered.proxy.network.packet.legacy.LegacyPingPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundHandshakePacket; import com.velocitypowered.proxy.network.registry.protocol.ProtocolRegistry; -import com.velocitypowered.proxy.network.registry.state.ProtocolStates; import io.netty.buffer.ByteBuf; import java.net.InetAddress; import java.net.InetSocketAddress; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/InitialConnectSessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/InitialConnectSessionHandler.java index 9956cd8ad..e2b179906 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/InitialConnectSessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/InitialConnectSessionHandler.java @@ -20,8 +20,8 @@ package com.velocitypowered.proxy.connection.client; import com.velocitypowered.proxy.connection.MinecraftSessionHandler; import com.velocitypowered.proxy.connection.backend.BungeeCordMessageResponder; import com.velocitypowered.proxy.connection.backend.VelocityServerConnection; -import com.velocitypowered.proxy.network.PluginMessageUtil; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundPluginMessagePacket; +import com.velocitypowered.proxy.network.java.PluginMessageUtil; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundPluginMessagePacket; public class InitialConnectSessionHandler implements MinecraftSessionHandler { diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/InitialInboundConnection.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/InitialInboundConnection.java index 448cf69ce..3a71d885e 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/InitialInboundConnection.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/InitialInboundConnection.java @@ -22,8 +22,8 @@ import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.api.proxy.connection.InboundConnection; import com.velocitypowered.proxy.connection.MinecraftConnection; import com.velocitypowered.proxy.connection.MinecraftConnectionAssociation; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundDisconnectPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundHandshakePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundDisconnectPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundHandshakePacket; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.util.Locale; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/JavaClientSettingsWrapper.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/JavaClientSettingsWrapper.java index d5c64d708..48448f940 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/JavaClientSettingsWrapper.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/JavaClientSettingsWrapper.java @@ -19,7 +19,7 @@ package com.velocitypowered.proxy.connection.client; import com.velocitypowered.api.proxy.player.java.JavaClientSettings; import com.velocitypowered.api.proxy.player.java.SkinParts; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundClientSettingsPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundClientSettingsPacket; import java.util.Locale; import org.checkerframework.checker.nullness.qual.Nullable; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/LoginSessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/LoginSessionHandler.java index ab6d14de6..d5bf9f077 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/LoginSessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/LoginSessionHandler.java @@ -46,12 +46,12 @@ import com.velocitypowered.proxy.config.PlayerInfoForwarding; import com.velocitypowered.proxy.config.VelocityConfiguration; import com.velocitypowered.proxy.connection.MinecraftConnection; import com.velocitypowered.proxy.connection.MinecraftSessionHandler; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundEncryptionRequestPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundServerLoginSuccessPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundSetCompressionPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundEncryptionResponsePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundServerLoginPacket; -import com.velocitypowered.proxy.network.registry.state.ProtocolStates; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundEncryptionRequestPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundServerLoginSuccessPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundSetCompressionPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundEncryptionResponsePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundServerLoginPacket; +import com.velocitypowered.proxy.network.java.states.ProtocolStates; import io.netty.buffer.ByteBuf; import java.net.InetSocketAddress; import java.net.SocketAddress; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/StatusSessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/StatusSessionHandler.java index ac9c803d7..cf1ff01b3 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/StatusSessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/StatusSessionHandler.java @@ -31,12 +31,12 @@ import com.velocitypowered.proxy.config.PingPassthroughMode; import com.velocitypowered.proxy.config.VelocityConfiguration; import com.velocitypowered.proxy.connection.MinecraftConnection; import com.velocitypowered.proxy.connection.MinecraftSessionHandler; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundStatusPingPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundStatusResponsePacket; -import com.velocitypowered.proxy.network.packet.legacy.LegacyDisconnectPacket; -import com.velocitypowered.proxy.network.packet.legacy.LegacyPingPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundStatusPingPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundStatusRequestPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundStatusPingPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundStatusResponsePacket; +import com.velocitypowered.proxy.network.java.packet.legacy.LegacyDisconnectPacket; +import com.velocitypowered.proxy.network.java.packet.legacy.LegacyPingPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundStatusPingPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundStatusRequestPacket; import com.velocitypowered.proxy.server.VelocityRegisteredServer; import com.velocitypowered.proxy.util.except.QuietRuntimeException; import io.netty.buffer.ByteBuf; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/forge/legacy/LegacyForgeHandshakeBackendPhase.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/forge/legacy/LegacyForgeHandshakeBackendPhase.java index 690427cb1..d1ee96a41 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/forge/legacy/LegacyForgeHandshakeBackendPhase.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/forge/legacy/LegacyForgeHandshakeBackendPhase.java @@ -23,7 +23,7 @@ import com.velocitypowered.proxy.connection.backend.BackendConnectionPhase; import com.velocitypowered.proxy.connection.backend.BackendConnectionPhases; import com.velocitypowered.proxy.connection.backend.VelocityServerConnection; import com.velocitypowered.proxy.connection.client.ConnectedPlayer; -import com.velocitypowered.proxy.network.packet.AbstractPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.AbstractPluginMessagePacket; import javax.annotation.Nullable; /** diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/forge/legacy/LegacyForgeHandshakeClientPhase.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/forge/legacy/LegacyForgeHandshakeClientPhase.java index 748925f86..465a9dd11 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/forge/legacy/LegacyForgeHandshakeClientPhase.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/forge/legacy/LegacyForgeHandshakeClientPhase.java @@ -24,7 +24,7 @@ import com.velocitypowered.proxy.connection.backend.VelocityServerConnection; import com.velocitypowered.proxy.connection.client.ClientConnectionPhase; import com.velocitypowered.proxy.connection.client.ClientPlaySessionHandler; import com.velocitypowered.proxy.connection.client.ConnectedPlayer; -import com.velocitypowered.proxy.network.packet.AbstractPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.AbstractPluginMessagePacket; import java.util.List; import javax.annotation.Nullable; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/forge/legacy/LegacyForgeUtil.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/forge/legacy/LegacyForgeUtil.java index 8f0a7a567..b9fbadb66 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/forge/legacy/LegacyForgeUtil.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/forge/legacy/LegacyForgeUtil.java @@ -25,8 +25,8 @@ import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.velocitypowered.api.util.ModInfo; import com.velocitypowered.proxy.network.ProtocolUtils; -import com.velocitypowered.proxy.network.packet.AbstractPluginMessagePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.AbstractPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundPluginMessagePacket; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import java.util.List; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/util/ConnectionMessages.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/util/ConnectionMessages.java index 5e29672ce..cc174ba0b 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/util/ConnectionMessages.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/util/ConnectionMessages.java @@ -18,7 +18,6 @@ package com.velocitypowered.proxy.connection.util; import net.kyori.adventure.text.Component; -import net.kyori.adventure.text.TextComponent; import net.kyori.adventure.text.TranslatableComponent; import net.kyori.adventure.text.format.NamedTextColor; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/util/ConnectionRequestResults.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/util/ConnectionRequestResults.java index 54c573eea..72a49ac55 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/util/ConnectionRequestResults.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/util/ConnectionRequestResults.java @@ -20,7 +20,7 @@ package com.velocitypowered.proxy.connection.util; import com.velocitypowered.api.proxy.player.ConnectionRequestBuilder; import com.velocitypowered.api.proxy.player.ConnectionRequestBuilder.Status; import com.velocitypowered.api.proxy.server.RegisteredServer; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundDisconnectPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundDisconnectPacket; import javax.annotation.Nullable; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/BackendChannelInitializer.java b/proxy/src/main/java/com/velocitypowered/proxy/network/BackendChannelInitializer.java index c3f711535..c43879200 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/BackendChannelInitializer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/BackendChannelInitializer.java @@ -25,12 +25,12 @@ import static com.velocitypowered.proxy.network.HandlerNames.MINECRAFT_ENCODER; import static com.velocitypowered.proxy.network.HandlerNames.READ_TIMEOUT; import com.velocitypowered.proxy.VelocityServer; +import com.velocitypowered.proxy.network.generic.pipeline.AutoReadHolderHandler; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftDecoder; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftEncoder; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftVarintFrameDecoder; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftVarintLengthEncoder; import com.velocitypowered.proxy.network.packet.PacketDirection; -import com.velocitypowered.proxy.network.pipeline.AutoReadHolderHandler; -import com.velocitypowered.proxy.network.pipeline.MinecraftDecoder; -import com.velocitypowered.proxy.network.pipeline.MinecraftEncoder; -import com.velocitypowered.proxy.network.pipeline.MinecraftVarintFrameDecoder; -import com.velocitypowered.proxy.network.pipeline.MinecraftVarintLengthEncoder; import io.netty.channel.Channel; import io.netty.channel.ChannelInitializer; import io.netty.handler.timeout.ReadTimeoutHandler; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/ConnectionManager.java b/proxy/src/main/java/com/velocitypowered/proxy/network/ConnectionManager.java index 814768d3e..9430ec51a 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/ConnectionManager.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/ConnectionManager.java @@ -27,7 +27,7 @@ import com.velocitypowered.api.network.ListenerType; import com.velocitypowered.api.network.NetworkEndpoint; import com.velocitypowered.natives.util.Natives; import com.velocitypowered.proxy.VelocityServer; -import com.velocitypowered.proxy.network.pipeline.GS4QueryHandler; +import com.velocitypowered.proxy.network.generic.pipeline.GS4QueryHandler; import com.velocitypowered.proxy.network.resolver.SeparatePoolInetNameResolver; import io.netty.bootstrap.Bootstrap; import io.netty.bootstrap.ServerBootstrap; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/NettyPreconditions.java b/proxy/src/main/java/com/velocitypowered/proxy/network/NettyPreconditions.java index f696158ab..ea90f9345 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/NettyPreconditions.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/NettyPreconditions.java @@ -18,7 +18,7 @@ package com.velocitypowered.proxy.network; import com.google.common.base.Strings; -import com.velocitypowered.proxy.network.pipeline.MinecraftDecoder; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftDecoder; import com.velocitypowered.proxy.util.except.QuietDecoderException; import io.netty.handler.codec.CorruptedFrameException; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/ProtocolUtils.java b/proxy/src/main/java/com/velocitypowered/proxy/network/ProtocolUtils.java index b4c2ecaca..7f5fee797 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/ProtocolUtils.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/ProtocolUtils.java @@ -22,8 +22,8 @@ import static com.velocitypowered.proxy.network.NettyPreconditions.checkFrame; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.api.proxy.player.java.JavaPlayerIdentity; -import com.velocitypowered.proxy.network.pipeline.MinecraftDecoder; -import com.velocitypowered.proxy.network.serialization.VelocityLegacyHoverEventSerializer; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftDecoder; +import com.velocitypowered.proxy.util.adventure.VelocityLegacyHoverEventSerializer; import com.velocitypowered.proxy.util.except.QuietDecoderException; import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufInputStream; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/ServerChannelInitializer.java b/proxy/src/main/java/com/velocitypowered/proxy/network/ServerChannelInitializer.java index 34a3b24e4..44db6a916 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/ServerChannelInitializer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/ServerChannelInitializer.java @@ -29,14 +29,14 @@ import static com.velocitypowered.proxy.network.HandlerNames.READ_TIMEOUT; import com.velocitypowered.proxy.VelocityServer; import com.velocitypowered.proxy.connection.MinecraftConnection; import com.velocitypowered.proxy.connection.client.HandshakeSessionHandler; +import com.velocitypowered.proxy.network.generic.pipeline.AutoReadHolderHandler; +import com.velocitypowered.proxy.network.java.pipeline.LegacyPingDecoder; +import com.velocitypowered.proxy.network.java.pipeline.LegacyPingEncoder; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftDecoder; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftEncoder; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftVarintFrameDecoder; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftVarintLengthEncoder; import com.velocitypowered.proxy.network.packet.PacketDirection; -import com.velocitypowered.proxy.network.pipeline.AutoReadHolderHandler; -import com.velocitypowered.proxy.network.pipeline.LegacyPingDecoder; -import com.velocitypowered.proxy.network.pipeline.LegacyPingEncoder; -import com.velocitypowered.proxy.network.pipeline.MinecraftDecoder; -import com.velocitypowered.proxy.network.pipeline.MinecraftEncoder; -import com.velocitypowered.proxy.network.pipeline.MinecraftVarintFrameDecoder; -import com.velocitypowered.proxy.network.pipeline.MinecraftVarintLengthEncoder; import io.netty.channel.Channel; import io.netty.channel.ChannelInitializer; import io.netty.handler.codec.haproxy.HAProxyMessageDecoder; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/AutoReadHolderHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/network/generic/pipeline/AutoReadHolderHandler.java similarity index 97% rename from proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/AutoReadHolderHandler.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/generic/pipeline/AutoReadHolderHandler.java index 3e5aef030..f61a1cfd0 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/AutoReadHolderHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/generic/pipeline/AutoReadHolderHandler.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.pipeline; +package com.velocitypowered.proxy.network.generic.pipeline; import io.netty.channel.ChannelDuplexHandler; import io.netty.channel.ChannelHandlerContext; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/GS4QueryHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/network/generic/pipeline/GS4QueryHandler.java similarity index 99% rename from proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/GS4QueryHandler.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/generic/pipeline/GS4QueryHandler.java index 3ba5236fd..d9900df20 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/GS4QueryHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/generic/pipeline/GS4QueryHandler.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.pipeline; +package com.velocitypowered.proxy.network.generic.pipeline; import static com.velocitypowered.api.event.connection.ProxyQueryEvent.QueryType.BASIC; import static com.velocitypowered.api.event.connection.ProxyQueryEvent.QueryType.FULL; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/PluginMessageUtil.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/PluginMessageUtil.java similarity index 98% rename from proxy/src/main/java/com/velocitypowered/proxy/network/PluginMessageUtil.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/PluginMessageUtil.java index b87e460a9..0ef76da11 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/PluginMessageUtil.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/PluginMessageUtil.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network; +package com.velocitypowered.proxy.network.java; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; @@ -26,7 +26,8 @@ import com.velocitypowered.api.proxy.messages.KeyedPluginChannelId; import com.velocitypowered.api.proxy.messages.PairedPluginChannelId; import com.velocitypowered.api.proxy.messages.PluginChannelId; import com.velocitypowered.api.util.ProxyVersion; -import com.velocitypowered.proxy.network.packet.AbstractPluginMessagePacket; +import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.AbstractPluginMessagePacket; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import java.nio.charset.StandardCharsets; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/AbstractKeepAlivePacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/AbstractKeepAlivePacket.java similarity index 90% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/AbstractKeepAlivePacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/AbstractKeepAlivePacket.java index 662e57ad6..48a377ad3 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/AbstractKeepAlivePacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/AbstractKeepAlivePacket.java @@ -15,11 +15,14 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet; +package com.velocitypowered.proxy.network.java.packet; import com.google.common.base.MoreObjects; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.packet.Packet; +import com.velocitypowered.proxy.network.packet.PacketReader; +import com.velocitypowered.proxy.network.packet.PacketWriter; import java.util.function.LongFunction; public abstract class AbstractKeepAlivePacket implements Packet { diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/AbstractPluginMessagePacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/AbstractPluginMessagePacket.java similarity index 90% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/AbstractPluginMessagePacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/AbstractPluginMessagePacket.java index 8f479cdac..56d49ec4c 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/AbstractPluginMessagePacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/AbstractPluginMessagePacket.java @@ -15,21 +15,24 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet; +package com.velocitypowered.proxy.network.java.packet; -import static com.velocitypowered.proxy.network.PluginMessageUtil.transformLegacyToModernChannel; +import static com.velocitypowered.proxy.network.java.PluginMessageUtil.transformLegacyToModernChannel; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; import com.velocitypowered.proxy.network.buffer.TypedDefaultByteBufHolder; +import com.velocitypowered.proxy.network.packet.Packet; +import com.velocitypowered.proxy.network.packet.PacketReader; +import com.velocitypowered.proxy.network.packet.PacketWriter; import io.netty.buffer.ByteBuf; import java.util.Objects; import org.checkerframework.checker.nullness.qual.MonotonicNonNull; -import org.checkerframework.checker.nullness.qual.Nullable; -public abstract class AbstractPluginMessagePacket> extends TypedDefaultByteBufHolder implements Packet { +public abstract class AbstractPluginMessagePacket> extends TypedDefaultByteBufHolder implements + Packet { protected static

> PacketReader

decoder(final Factory

factory) { return (buf, version) -> { String channel = ProtocolUtils.readString(buf); diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/AbstractStatusPingPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/AbstractStatusPingPacket.java similarity index 89% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/AbstractStatusPingPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/AbstractStatusPingPacket.java index 10e26b9f4..dbbe3b4a6 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/AbstractStatusPingPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/AbstractStatusPingPacket.java @@ -15,10 +15,13 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet; +package com.velocitypowered.proxy.network.java.packet; import com.google.common.base.MoreObjects; import com.velocitypowered.api.network.ProtocolVersion; +import com.velocitypowered.proxy.network.packet.Packet; +import com.velocitypowered.proxy.network.packet.PacketReader; +import com.velocitypowered.proxy.network.packet.PacketWriter; import io.netty.buffer.ByteBuf; import java.util.function.LongFunction; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/PacketHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/JavaPacketHandler.java similarity index 53% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/PacketHandler.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/JavaPacketHandler.java index 40b06ac13..ea4d8d017 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/PacketHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/JavaPacketHandler.java @@ -15,43 +15,43 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet; +package com.velocitypowered.proxy.network.java.packet; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundAvailableCommandsPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundBossBarPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundChatPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundDisconnectPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundEncryptionRequestPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundHeaderAndFooterPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundJoinGamePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundKeepAlivePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundLoginPluginMessagePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundPlayerListItemPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundPluginMessagePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundResourcePackRequestPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundRespawnPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundServerLoginSuccessPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundSetCompressionPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundStatusPingPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundStatusResponsePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundTabCompleteResponsePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundTitlePacket; -import com.velocitypowered.proxy.network.packet.legacy.LegacyHandshakePacket; -import com.velocitypowered.proxy.network.packet.legacy.LegacyPingPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundChatPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundClientSettingsPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundEncryptionResponsePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundHandshakePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundKeepAlivePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundLoginPluginResponsePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundPluginMessagePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundResourcePackResponsePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundServerLoginPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundStatusPingPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundStatusRequestPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundTabCompleteRequestPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundAvailableCommandsPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundBossBarPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundChatPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundDisconnectPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundEncryptionRequestPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundHeaderAndFooterPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundJoinGamePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundKeepAlivePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundLoginPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundPlayerListItemPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundResourcePackRequestPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundRespawnPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundServerLoginSuccessPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundSetCompressionPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundStatusPingPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundStatusResponsePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundTabCompleteResponsePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundTitlePacket; +import com.velocitypowered.proxy.network.java.packet.legacy.LegacyHandshakePacket; +import com.velocitypowered.proxy.network.java.packet.legacy.LegacyPingPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundChatPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundClientSettingsPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundEncryptionResponsePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundHandshakePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundKeepAlivePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundLoginPluginResponsePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundResourcePackResponsePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundServerLoginPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundStatusPingPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundStatusRequestPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundTabCompleteRequestPacket; -public interface PacketHandler { +public interface JavaPacketHandler { /* * Clientbound */ diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundAvailableCommandsPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundAvailableCommandsPacket.java similarity index 97% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundAvailableCommandsPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundAvailableCommandsPacket.java index 8005c993d..d669ced09 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundAvailableCommandsPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundAvailableCommandsPacket.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; import com.google.common.base.MoreObjects; import com.google.common.collect.ImmutableList; @@ -36,11 +36,11 @@ import com.mojang.brigadier.tree.RootCommandNode; import com.velocitypowered.api.command.CommandSource; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; +import com.velocitypowered.proxy.network.java.serialization.brigadier.ArgumentPropertyRegistry; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; -import com.velocitypowered.proxy.network.serialization.brigadier.ArgumentPropertyRegistry; import com.velocitypowered.proxy.util.collect.IdentityHashStrategy; import io.netty.buffer.ByteBuf; import it.unimi.dsi.fastutil.objects.Object2IntLinkedOpenCustomHashMap; @@ -186,7 +186,7 @@ public class ClientboundAvailableCommandsPacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundBossBarPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundBossBarPacket.java similarity index 96% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundBossBarPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundBossBarPacket.java index f792808f6..17cbbb5a7 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundBossBarPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundBossBarPacket.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; import com.google.common.base.MoreObjects; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import io.netty.buffer.ByteBuf; @@ -181,7 +181,7 @@ public class ClientboundBossBarPacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundChatPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundChatPacket.java similarity index 89% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundChatPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundChatPacket.java index 9b72311ec..2005607bd 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundChatPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundChatPacket.java @@ -15,19 +15,16 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; import com.google.common.base.MoreObjects; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; -import io.netty.buffer.ByteBuf; -import java.util.UUID; import net.kyori.adventure.identity.Identity; -import org.checkerframework.checker.nullness.qual.Nullable; public class ClientboundChatPacket implements Packet { public static final PacketReader DECODER = PacketReader.unsupported(); @@ -56,7 +53,7 @@ public class ClientboundChatPacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundDisconnectPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundDisconnectPacket.java similarity index 92% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundDisconnectPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundDisconnectPacket.java index b7db861e6..6b1159cb6 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundDisconnectPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundDisconnectPacket.java @@ -15,14 +15,14 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import net.kyori.adventure.text.Component; @@ -48,7 +48,7 @@ public class ClientboundDisconnectPacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundEncryptionRequestPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundEncryptionRequestPacket.java similarity index 94% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundEncryptionRequestPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundEncryptionRequestPacket.java index 7f7818f8b..075d508af 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundEncryptionRequestPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundEncryptionRequestPacket.java @@ -15,15 +15,15 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; import static com.velocitypowered.proxy.connection.VelocityConstants.EMPTY_BYTE_ARRAY; import com.google.common.base.MoreObjects; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import io.netty.buffer.ByteBuf; @@ -79,7 +79,7 @@ public class ClientboundEncryptionRequestPacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundHeaderAndFooterPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundHeaderAndFooterPacket.java similarity index 92% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundHeaderAndFooterPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundHeaderAndFooterPacket.java index b77fbc2f2..6e89093f4 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundHeaderAndFooterPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundHeaderAndFooterPacket.java @@ -15,14 +15,14 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; import static com.velocitypowered.proxy.network.ProtocolUtils.writeString; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; @@ -50,7 +50,7 @@ public class ClientboundHeaderAndFooterPacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundJoinGamePacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundJoinGamePacket.java similarity index 98% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundJoinGamePacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundJoinGamePacket.java index 022ba5607..787ec753c 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundJoinGamePacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundJoinGamePacket.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; import com.google.common.collect.ImmutableSet; import com.velocitypowered.api.network.ProtocolVersion; @@ -23,8 +23,8 @@ import com.velocitypowered.proxy.connection.registry.DimensionData; import com.velocitypowered.proxy.connection.registry.DimensionInfo; import com.velocitypowered.proxy.connection.registry.DimensionRegistry; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import io.netty.buffer.ByteBuf; @@ -331,7 +331,7 @@ public class ClientboundJoinGamePacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundKeepAlivePacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundKeepAlivePacket.java similarity index 82% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundKeepAlivePacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundKeepAlivePacket.java index 1b69d86bd..9381768d6 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundKeepAlivePacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundKeepAlivePacket.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; -import com.velocitypowered.proxy.network.packet.AbstractKeepAlivePacket; +import com.velocitypowered.proxy.network.java.packet.AbstractKeepAlivePacket; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; @@ -32,7 +32,7 @@ public class ClientboundKeepAlivePacket extends AbstractKeepAlivePacket implemen } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundLoginPluginMessagePacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundLoginPluginMessagePacket.java similarity index 91% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundLoginPluginMessagePacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundLoginPluginMessagePacket.java index 0c189e2f0..9d595ef1d 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundLoginPluginMessagePacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundLoginPluginMessagePacket.java @@ -15,20 +15,18 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; import com.google.common.base.MoreObjects; -import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import io.netty.buffer.ByteBuf; import io.netty.buffer.DefaultByteBufHolder; import io.netty.buffer.Unpooled; import java.util.Objects; -import org.checkerframework.checker.nullness.qual.Nullable; public class ClientboundLoginPluginMessagePacket extends DefaultByteBufHolder implements Packet { public static final PacketReader DECODER = (buf, version) -> { @@ -58,7 +56,7 @@ public class ClientboundLoginPluginMessagePacket extends DefaultByteBufHolder im } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundPlayerListItemPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundPlayerListItemPacket.java similarity index 97% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundPlayerListItemPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundPlayerListItemPacket.java index 1b1f7666c..418a9bc38 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundPlayerListItemPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundPlayerListItemPacket.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; import com.google.common.base.MoreObjects; import com.google.common.base.VerifyException; @@ -24,8 +24,8 @@ import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.api.proxy.player.TabListEntry; import com.velocitypowered.api.proxy.player.java.JavaPlayerIdentity; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import io.netty.buffer.ByteBuf; @@ -168,7 +168,7 @@ public class ClientboundPlayerListItemPacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundPluginMessagePacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundPluginMessagePacket.java similarity index 85% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundPluginMessagePacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundPluginMessagePacket.java index 4d0fb27a0..656244b48 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundPluginMessagePacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundPluginMessagePacket.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; -import com.velocitypowered.proxy.network.packet.AbstractPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.AbstractPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import io.netty.buffer.ByteBuf; @@ -34,7 +34,7 @@ public class ClientboundPluginMessagePacket extends AbstractPluginMessagePacket< } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundResourcePackRequestPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundResourcePackRequestPacket.java similarity index 91% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundResourcePackRequestPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundResourcePackRequestPacket.java index 541f56b49..1db1544ae 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundResourcePackRequestPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundResourcePackRequestPacket.java @@ -15,12 +15,12 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; import com.google.common.base.MoreObjects; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import java.util.Objects; @@ -45,7 +45,7 @@ public class ClientboundResourcePackRequestPacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundRespawnPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundRespawnPacket.java similarity index 97% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundRespawnPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundRespawnPacket.java index 4eddab4b4..21ff0b3ba 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundRespawnPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundRespawnPacket.java @@ -15,15 +15,15 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; import com.google.common.base.MoreObjects; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.connection.registry.DimensionData; import com.velocitypowered.proxy.connection.registry.DimensionInfo; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import io.netty.buffer.ByteBuf; @@ -188,7 +188,7 @@ public class ClientboundRespawnPacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundServerLoginSuccessPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundServerLoginSuccessPacket.java similarity index 93% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundServerLoginSuccessPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundServerLoginSuccessPacket.java index 89420558e..10fad6821 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundServerLoginSuccessPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundServerLoginSuccessPacket.java @@ -15,14 +15,14 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; import com.google.common.base.MoreObjects; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.api.util.UuidUtils; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import java.util.Objects; @@ -61,7 +61,7 @@ public class ClientboundServerLoginSuccessPacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundSetCompressionPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundSetCompressionPacket.java similarity index 90% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundSetCompressionPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundSetCompressionPacket.java index 012220a3b..de29c92fb 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundSetCompressionPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundSetCompressionPacket.java @@ -15,12 +15,12 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; import com.google.common.base.MoreObjects; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; @@ -39,7 +39,7 @@ public class ClientboundSetCompressionPacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundStatusPingPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundStatusPingPacket.java similarity index 82% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundStatusPingPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundStatusPingPacket.java index 8380da70d..4385804b6 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundStatusPingPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundStatusPingPacket.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; -import com.velocitypowered.proxy.network.packet.AbstractStatusPingPacket; +import com.velocitypowered.proxy.network.java.packet.AbstractStatusPingPacket; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; @@ -32,7 +32,7 @@ public class ClientboundStatusPingPacket extends AbstractStatusPingPacket implem } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundStatusResponsePacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundStatusResponsePacket.java similarity index 85% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundStatusResponsePacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundStatusResponsePacket.java index 5a1d9200a..ebfe8f6f0 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundStatusResponsePacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundStatusResponsePacket.java @@ -15,17 +15,14 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; import com.google.common.base.MoreObjects; -import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; -import io.netty.buffer.ByteBuf; -import org.checkerframework.checker.nullness.qual.Nullable; public class ClientboundStatusResponsePacket implements Packet { public static final PacketReader DECODER = (buf, version) -> { @@ -42,7 +39,7 @@ public class ClientboundStatusResponsePacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundTabCompleteResponsePacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundTabCompleteResponsePacket.java similarity index 96% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundTabCompleteResponsePacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundTabCompleteResponsePacket.java index 98115e591..0df512e6e 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundTabCompleteResponsePacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundTabCompleteResponsePacket.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; import com.google.common.base.MoreObjects; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import io.netty.buffer.ByteBuf; @@ -112,7 +112,7 @@ public class ClientboundTabCompleteResponsePacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundTitlePacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundTitlePacket.java similarity index 97% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundTitlePacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundTitlePacket.java index b0e14515c..3d9a2db2d 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/clientbound/ClientboundTitlePacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/clientbound/ClientboundTitlePacket.java @@ -15,14 +15,14 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.clientbound; +package com.velocitypowered.proxy.network.java.packet.clientbound; import com.google.common.base.MoreObjects; import com.google.common.primitives.Ints; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import com.velocitypowered.proxy.util.DurationUtils; @@ -158,7 +158,7 @@ public class ClientboundTitlePacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/legacy/LegacyDisconnectPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/legacy/LegacyDisconnectPacket.java similarity index 98% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/legacy/LegacyDisconnectPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/legacy/LegacyDisconnectPacket.java index ea5ff3392..e0be4358b 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/legacy/LegacyDisconnectPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/legacy/LegacyDisconnectPacket.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.legacy; +package com.velocitypowered.proxy.network.java.packet.legacy; import com.google.common.collect.ImmutableList; import com.velocitypowered.api.proxy.server.ServerPing; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/legacy/LegacyHandshakePacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/legacy/LegacyHandshakePacket.java similarity index 85% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/legacy/LegacyHandshakePacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/legacy/LegacyHandshakePacket.java index 4e46b51cc..1f880b651 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/legacy/LegacyHandshakePacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/legacy/LegacyHandshakePacket.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.legacy; +package com.velocitypowered.proxy.network.java.packet.legacy; import com.velocitypowered.api.network.ProtocolVersion; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import io.netty.buffer.ByteBuf; public class LegacyHandshakePacket implements LegacyPacket, Packet { @@ -30,7 +30,7 @@ public class LegacyHandshakePacket implements LegacyPacket, Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/legacy/LegacyMinecraftPingVersion.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/legacy/LegacyMinecraftPingVersion.java similarity index 92% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/legacy/LegacyMinecraftPingVersion.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/legacy/LegacyMinecraftPingVersion.java index 3622e30c0..7b4abb9f7 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/legacy/LegacyMinecraftPingVersion.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/legacy/LegacyMinecraftPingVersion.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.legacy; +package com.velocitypowered.proxy.network.java.packet.legacy; public enum LegacyMinecraftPingVersion { MINECRAFT_1_3, diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/legacy/LegacyPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/legacy/LegacyPacket.java similarity index 92% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/legacy/LegacyPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/legacy/LegacyPacket.java index 024a3695e..802e1f4f5 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/legacy/LegacyPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/legacy/LegacyPacket.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.legacy; +package com.velocitypowered.proxy.network.java.packet.legacy; public interface LegacyPacket { } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/legacy/LegacyPingPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/legacy/LegacyPingPacket.java similarity index 90% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/legacy/LegacyPingPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/legacy/LegacyPingPacket.java index 0c1cdc3f8..b76c122c9 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/legacy/LegacyPingPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/legacy/LegacyPingPacket.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.legacy; +package com.velocitypowered.proxy.network.java.packet.legacy; import com.velocitypowered.api.network.ProtocolVersion; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import io.netty.buffer.ByteBuf; import java.net.InetSocketAddress; import org.checkerframework.checker.nullness.qual.Nullable; @@ -45,7 +45,7 @@ public class LegacyPingPacket implements LegacyPacket, Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundChatPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundChatPacket.java similarity index 90% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundChatPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundChatPacket.java index eb4c06954..e0ef73a6d 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundChatPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundChatPacket.java @@ -15,12 +15,12 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.serverbound; +package com.velocitypowered.proxy.network.java.packet.serverbound; import com.google.common.base.MoreObjects; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; @@ -41,7 +41,7 @@ public class ServerboundChatPacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundClientSettingsPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundClientSettingsPacket.java similarity index 95% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundClientSettingsPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundClientSettingsPacket.java index 76f7edd1b..97d43dcef 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundClientSettingsPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundClientSettingsPacket.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.serverbound; +package com.velocitypowered.proxy.network.java.packet.serverbound; import com.google.common.base.MoreObjects; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import io.netty.buffer.ByteBuf; @@ -92,7 +92,7 @@ public class ServerboundClientSettingsPacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundEncryptionResponsePacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundEncryptionResponsePacket.java similarity index 94% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundEncryptionResponsePacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundEncryptionResponsePacket.java index e10835cd5..1a10fb7ab 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundEncryptionResponsePacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundEncryptionResponsePacket.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.serverbound; +package com.velocitypowered.proxy.network.java.packet.serverbound; import com.google.common.base.MoreObjects; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import io.netty.buffer.ByteBuf; @@ -78,7 +78,7 @@ public class ServerboundEncryptionResponsePacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundHandshakePacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundHandshakePacket.java similarity index 94% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundHandshakePacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundHandshakePacket.java index d02b3367a..1559725fc 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundHandshakePacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundHandshakePacket.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.serverbound; +package com.velocitypowered.proxy.network.java.packet.serverbound; import com.google.common.base.MoreObjects; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; @@ -56,7 +56,7 @@ public class ServerboundHandshakePacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundKeepAlivePacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundKeepAlivePacket.java similarity index 82% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundKeepAlivePacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundKeepAlivePacket.java index 64adbf36d..ee07c35fd 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundKeepAlivePacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundKeepAlivePacket.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.serverbound; +package com.velocitypowered.proxy.network.java.packet.serverbound; -import com.velocitypowered.proxy.network.packet.AbstractKeepAlivePacket; +import com.velocitypowered.proxy.network.java.packet.AbstractKeepAlivePacket; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; @@ -32,7 +32,7 @@ public class ServerboundKeepAlivePacket extends AbstractKeepAlivePacket implemen } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundLoginPluginResponsePacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundLoginPluginResponsePacket.java similarity index 93% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundLoginPluginResponsePacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundLoginPluginResponsePacket.java index 31e4dfb4b..4bc00be1d 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundLoginPluginResponsePacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundLoginPluginResponsePacket.java @@ -15,13 +15,12 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.serverbound; +package com.velocitypowered.proxy.network.java.packet.serverbound; import com.google.common.base.MoreObjects; -import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import io.netty.buffer.ByteBuf; @@ -59,7 +58,7 @@ public class ServerboundLoginPluginResponsePacket extends DefaultByteBufHolder i } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundPluginMessagePacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundPluginMessagePacket.java similarity index 85% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundPluginMessagePacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundPluginMessagePacket.java index b544323a0..0bd0e7344 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundPluginMessagePacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundPluginMessagePacket.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.serverbound; +package com.velocitypowered.proxy.network.java.packet.serverbound; -import com.velocitypowered.proxy.network.packet.AbstractPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.AbstractPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import io.netty.buffer.ByteBuf; @@ -34,7 +34,7 @@ public class ServerboundPluginMessagePacket extends AbstractPluginMessagePacket< } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundResourcePackResponsePacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundResourcePackResponsePacket.java similarity index 93% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundResourcePackResponsePacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundResourcePackResponsePacket.java index 1a68ef0b7..45be00e75 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundResourcePackResponsePacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundResourcePackResponsePacket.java @@ -15,14 +15,14 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.serverbound; +package com.velocitypowered.proxy.network.java.packet.serverbound; import com.google.common.base.MoreObjects; import com.velocitypowered.api.event.player.PlayerResourcePackStatusEvent.Status; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import io.netty.buffer.ByteBuf; @@ -58,7 +58,7 @@ public class ServerboundResourcePackResponsePacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundServerLoginPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundServerLoginPacket.java similarity index 93% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundServerLoginPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundServerLoginPacket.java index d70c3a3c0..45971fc0b 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundServerLoginPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundServerLoginPacket.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.serverbound; +package com.velocitypowered.proxy.network.java.packet.serverbound; import com.google.common.base.MoreObjects; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import com.velocitypowered.proxy.util.except.QuietDecoderException; @@ -59,7 +59,7 @@ public class ServerboundServerLoginPacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundStatusPingPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundStatusPingPacket.java similarity index 82% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundStatusPingPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundStatusPingPacket.java index d71454527..5e738a226 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundStatusPingPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundStatusPingPacket.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.serverbound; +package com.velocitypowered.proxy.network.java.packet.serverbound; -import com.velocitypowered.proxy.network.packet.AbstractStatusPingPacket; +import com.velocitypowered.proxy.network.java.packet.AbstractStatusPingPacket; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; @@ -32,7 +32,7 @@ public class ServerboundStatusPingPacket extends AbstractStatusPingPacket implem } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundStatusRequestPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundStatusRequestPacket.java similarity index 88% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundStatusRequestPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundStatusRequestPacket.java index 8db8ab693..8aea7e90f 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundStatusRequestPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundStatusRequestPacket.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.serverbound; +package com.velocitypowered.proxy.network.java.packet.serverbound; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; @@ -31,7 +31,7 @@ public class ServerboundStatusRequestPacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundTabCompleteRequestPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundTabCompleteRequestPacket.java similarity index 95% rename from proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundTabCompleteRequestPacket.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundTabCompleteRequestPacket.java index f09e19601..0992580f8 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/serverbound/ServerboundTabCompleteRequestPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/packet/serverbound/ServerboundTabCompleteRequestPacket.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.packet.serverbound; +package com.velocitypowered.proxy.network.java.packet.serverbound; import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_13; import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_8; @@ -24,8 +24,8 @@ import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_9; import com.google.common.base.MoreObjects; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import com.velocitypowered.proxy.network.packet.Packet; -import com.velocitypowered.proxy.network.packet.PacketHandler; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; import io.netty.buffer.ByteBuf; @@ -129,7 +129,7 @@ public class ServerboundTabCompleteRequestPacket implements Packet { } @Override - public boolean handle(PacketHandler handler) { + public boolean handle(JavaPacketHandler handler) { return handler.handle(this); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/LegacyPingDecoder.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/LegacyPingDecoder.java similarity index 90% rename from proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/LegacyPingDecoder.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/LegacyPingDecoder.java index 63f328ea3..04c7cea00 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/LegacyPingDecoder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/LegacyPingDecoder.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.pipeline; +package com.velocitypowered.proxy.network.java.pipeline; import static com.velocitypowered.proxy.network.NettyPreconditions.checkFrame; -import com.velocitypowered.proxy.network.packet.legacy.LegacyHandshakePacket; -import com.velocitypowered.proxy.network.packet.legacy.LegacyMinecraftPingVersion; -import com.velocitypowered.proxy.network.packet.legacy.LegacyPingPacket; +import com.velocitypowered.proxy.network.java.packet.legacy.LegacyHandshakePacket; +import com.velocitypowered.proxy.network.java.packet.legacy.LegacyMinecraftPingVersion; +import com.velocitypowered.proxy.network.java.packet.legacy.LegacyPingPacket; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.ByteToMessageDecoder; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/LegacyPingEncoder.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/LegacyPingEncoder.java similarity index 91% rename from proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/LegacyPingEncoder.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/LegacyPingEncoder.java index 0932c4d92..8b5042f4b 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/LegacyPingEncoder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/LegacyPingEncoder.java @@ -15,9 +15,9 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.pipeline; +package com.velocitypowered.proxy.network.java.pipeline; -import com.velocitypowered.proxy.network.packet.legacy.LegacyDisconnectPacket; +import com.velocitypowered.proxy.network.java.packet.legacy.LegacyDisconnectPacket; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftCipherDecoder.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftCipherDecoder.java similarity index 96% rename from proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftCipherDecoder.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftCipherDecoder.java index 4f17a1538..8714573de 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftCipherDecoder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftCipherDecoder.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.pipeline; +package com.velocitypowered.proxy.network.java.pipeline; import com.google.common.base.Preconditions; import com.velocitypowered.natives.encryption.VelocityCipher; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftCipherEncoder.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftCipherEncoder.java similarity index 96% rename from proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftCipherEncoder.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftCipherEncoder.java index 03b58b24e..46a269702 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftCipherEncoder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftCipherEncoder.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.pipeline; +package com.velocitypowered.proxy.network.java.pipeline; import com.google.common.base.Preconditions; import com.velocitypowered.natives.encryption.VelocityCipher; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftCompressDecoder.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftCompressDecoder.java similarity index 98% rename from proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftCompressDecoder.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftCompressDecoder.java index 138403ff5..c7c9f8f10 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftCompressDecoder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftCompressDecoder.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.pipeline; +package com.velocitypowered.proxy.network.java.pipeline; import static com.velocitypowered.natives.util.MoreByteBufUtils.ensureCompatible; import static com.velocitypowered.natives.util.MoreByteBufUtils.preferredBuffer; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftCompressorAndLengthEncoder.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftCompressorAndLengthEncoder.java similarity index 96% rename from proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftCompressorAndLengthEncoder.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftCompressorAndLengthEncoder.java index e174250db..e910377de 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftCompressorAndLengthEncoder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftCompressorAndLengthEncoder.java @@ -15,9 +15,9 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.pipeline; +package com.velocitypowered.proxy.network.java.pipeline; -import static com.velocitypowered.proxy.network.pipeline.MinecraftVarintLengthEncoder.IS_JAVA_CIPHER; +import static com.velocitypowered.proxy.network.java.pipeline.MinecraftVarintLengthEncoder.IS_JAVA_CIPHER; import com.velocitypowered.natives.compression.VelocityCompressor; import com.velocitypowered.natives.util.MoreByteBufUtils; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftDecoder.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftDecoder.java similarity index 97% rename from proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftDecoder.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftDecoder.java index b42477da6..cf179c7e7 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftDecoder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftDecoder.java @@ -15,17 +15,17 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.pipeline; +package com.velocitypowered.proxy.network.java.pipeline; import com.google.common.base.Preconditions; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.states.ProtocolStates; import com.velocitypowered.proxy.network.packet.Packet; import com.velocitypowered.proxy.network.packet.PacketDirection; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.registry.packet.PacketRegistryMap; import com.velocitypowered.proxy.network.registry.protocol.ProtocolRegistry; -import com.velocitypowered.proxy.network.registry.state.ProtocolStates; import com.velocitypowered.proxy.util.except.QuietRuntimeException; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftEncoder.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftEncoder.java similarity index 94% rename from proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftEncoder.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftEncoder.java index ef861a841..247196338 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftEncoder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftEncoder.java @@ -15,15 +15,15 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.pipeline; +package com.velocitypowered.proxy.network.java.pipeline; import com.google.common.base.Preconditions; import com.velocitypowered.api.network.ProtocolVersion; +import com.velocitypowered.proxy.network.java.states.ProtocolStates; import com.velocitypowered.proxy.network.packet.Packet; import com.velocitypowered.proxy.network.packet.PacketDirection; import com.velocitypowered.proxy.network.registry.packet.PacketRegistryMap; import com.velocitypowered.proxy.network.registry.protocol.ProtocolRegistry; -import com.velocitypowered.proxy.network.registry.state.ProtocolStates; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.MessageToByteEncoder; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftVarintFrameDecoder.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftVarintFrameDecoder.java similarity index 94% rename from proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftVarintFrameDecoder.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftVarintFrameDecoder.java index ebe7faad9..f6b6ded64 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftVarintFrameDecoder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftVarintFrameDecoder.java @@ -15,9 +15,9 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.pipeline; +package com.velocitypowered.proxy.network.java.pipeline; -import com.velocitypowered.proxy.network.pipeline.VarintByteDecoder.DecodeResult; +import com.velocitypowered.proxy.network.java.pipeline.VarintByteDecoder.DecodeResult; import com.velocitypowered.proxy.util.except.QuietDecoderException; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftVarintLengthEncoder.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftVarintLengthEncoder.java similarity index 97% rename from proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftVarintLengthEncoder.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftVarintLengthEncoder.java index 91645e9ea..3ac21545a 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/MinecraftVarintLengthEncoder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/MinecraftVarintLengthEncoder.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.pipeline; +package com.velocitypowered.proxy.network.java.pipeline; import com.velocitypowered.natives.encryption.JavaVelocityCipher; import com.velocitypowered.natives.util.Natives; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/VarintByteDecoder.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/VarintByteDecoder.java similarity index 96% rename from proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/VarintByteDecoder.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/VarintByteDecoder.java index 03f9ff73a..c86cb2d3c 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/pipeline/VarintByteDecoder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/pipeline/VarintByteDecoder.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.pipeline; +package com.velocitypowered.proxy.network.java.pipeline; import io.netty.util.ByteProcessor; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/ArgumentPropertyRegistry.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/ArgumentPropertyRegistry.java similarity index 87% rename from proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/ArgumentPropertyRegistry.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/ArgumentPropertyRegistry.java index efeaaa68c..ec8e04b43 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/ArgumentPropertyRegistry.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/ArgumentPropertyRegistry.java @@ -15,15 +15,15 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.serialization.brigadier; +package com.velocitypowered.proxy.network.java.serialization.brigadier; -import static com.velocitypowered.proxy.network.serialization.brigadier.DoubleArgumentPropertySerializer.DOUBLE; -import static com.velocitypowered.proxy.network.serialization.brigadier.EmptyArgumentPropertySerializer.EMPTY; -import static com.velocitypowered.proxy.network.serialization.brigadier.FloatArgumentPropertySerializer.FLOAT; -import static com.velocitypowered.proxy.network.serialization.brigadier.IntegerArgumentPropertySerializer.INTEGER; -import static com.velocitypowered.proxy.network.serialization.brigadier.LongArgumentPropertySerializer.LONG; -import static com.velocitypowered.proxy.network.serialization.brigadier.ModArgumentPropertySerializer.MOD; -import static com.velocitypowered.proxy.network.serialization.brigadier.StringArgumentPropertySerializer.STRING; +import static com.velocitypowered.proxy.network.java.serialization.brigadier.DoubleArgumentPropertySerializer.DOUBLE; +import static com.velocitypowered.proxy.network.java.serialization.brigadier.EmptyArgumentPropertySerializer.EMPTY; +import static com.velocitypowered.proxy.network.java.serialization.brigadier.FloatArgumentPropertySerializer.FLOAT; +import static com.velocitypowered.proxy.network.java.serialization.brigadier.IntegerArgumentPropertySerializer.INTEGER; +import static com.velocitypowered.proxy.network.java.serialization.brigadier.LongArgumentPropertySerializer.LONG; +import static com.velocitypowered.proxy.network.java.serialization.brigadier.ModArgumentPropertySerializer.MOD; +import static com.velocitypowered.proxy.network.java.serialization.brigadier.StringArgumentPropertySerializer.STRING; import com.mojang.brigadier.arguments.ArgumentType; import com.mojang.brigadier.arguments.BoolArgumentType; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/ArgumentPropertySerializer.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/ArgumentPropertySerializer.java similarity index 92% rename from proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/ArgumentPropertySerializer.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/ArgumentPropertySerializer.java index b2b28c59f..9158176fb 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/ArgumentPropertySerializer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/ArgumentPropertySerializer.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.serialization.brigadier; +package com.velocitypowered.proxy.network.java.serialization.brigadier; import io.netty.buffer.ByteBuf; import org.checkerframework.checker.nullness.qual.Nullable; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/ByteArgumentPropertySerializer.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/ByteArgumentPropertySerializer.java similarity index 94% rename from proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/ByteArgumentPropertySerializer.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/ByteArgumentPropertySerializer.java index 79e9ebd58..e7e6c7b42 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/ByteArgumentPropertySerializer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/ByteArgumentPropertySerializer.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.serialization.brigadier; +package com.velocitypowered.proxy.network.java.serialization.brigadier; import io.netty.buffer.ByteBuf; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/DoubleArgumentPropertySerializer.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/DoubleArgumentPropertySerializer.java similarity index 80% rename from proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/DoubleArgumentPropertySerializer.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/DoubleArgumentPropertySerializer.java index 922d6567c..15b1293c4 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/DoubleArgumentPropertySerializer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/DoubleArgumentPropertySerializer.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.serialization.brigadier; +package com.velocitypowered.proxy.network.java.serialization.brigadier; -import static com.velocitypowered.proxy.network.serialization.brigadier.IntegerArgumentPropertySerializer.HAS_MAXIMUM; -import static com.velocitypowered.proxy.network.serialization.brigadier.IntegerArgumentPropertySerializer.HAS_MINIMUM; -import static com.velocitypowered.proxy.network.serialization.brigadier.IntegerArgumentPropertySerializer.getFlags; +import static com.velocitypowered.proxy.network.java.serialization.brigadier.IntegerArgumentPropertySerializer.HAS_MAXIMUM; +import static com.velocitypowered.proxy.network.java.serialization.brigadier.IntegerArgumentPropertySerializer.HAS_MINIMUM; +import static com.velocitypowered.proxy.network.java.serialization.brigadier.IntegerArgumentPropertySerializer.getFlags; import com.mojang.brigadier.arguments.DoubleArgumentType; import io.netty.buffer.ByteBuf; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/EmptyArgumentPropertySerializer.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/EmptyArgumentPropertySerializer.java similarity index 94% rename from proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/EmptyArgumentPropertySerializer.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/EmptyArgumentPropertySerializer.java index d7d681a10..9100dd6cf 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/EmptyArgumentPropertySerializer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/EmptyArgumentPropertySerializer.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.serialization.brigadier; +package com.velocitypowered.proxy.network.java.serialization.brigadier; import io.netty.buffer.ByteBuf; import org.checkerframework.checker.nullness.qual.Nullable; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/FloatArgumentPropertySerializer.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/FloatArgumentPropertySerializer.java similarity index 80% rename from proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/FloatArgumentPropertySerializer.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/FloatArgumentPropertySerializer.java index 9c5d75bbf..7be319bb9 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/FloatArgumentPropertySerializer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/FloatArgumentPropertySerializer.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.serialization.brigadier; +package com.velocitypowered.proxy.network.java.serialization.brigadier; -import static com.velocitypowered.proxy.network.serialization.brigadier.IntegerArgumentPropertySerializer.HAS_MAXIMUM; -import static com.velocitypowered.proxy.network.serialization.brigadier.IntegerArgumentPropertySerializer.HAS_MINIMUM; -import static com.velocitypowered.proxy.network.serialization.brigadier.IntegerArgumentPropertySerializer.getFlags; +import static com.velocitypowered.proxy.network.java.serialization.brigadier.IntegerArgumentPropertySerializer.HAS_MAXIMUM; +import static com.velocitypowered.proxy.network.java.serialization.brigadier.IntegerArgumentPropertySerializer.HAS_MINIMUM; +import static com.velocitypowered.proxy.network.java.serialization.brigadier.IntegerArgumentPropertySerializer.getFlags; import com.mojang.brigadier.arguments.FloatArgumentType; import io.netty.buffer.ByteBuf; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/GenericArgumentPropertySerializer.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/GenericArgumentPropertySerializer.java similarity index 95% rename from proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/GenericArgumentPropertySerializer.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/GenericArgumentPropertySerializer.java index 9c838412a..300ab31d4 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/GenericArgumentPropertySerializer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/GenericArgumentPropertySerializer.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.serialization.brigadier; +package com.velocitypowered.proxy.network.java.serialization.brigadier; import com.mojang.brigadier.arguments.ArgumentType; import io.netty.buffer.ByteBuf; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/IntegerArgumentPropertySerializer.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/IntegerArgumentPropertySerializer.java similarity index 96% rename from proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/IntegerArgumentPropertySerializer.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/IntegerArgumentPropertySerializer.java index 5d2b90652..7838117d0 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/IntegerArgumentPropertySerializer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/IntegerArgumentPropertySerializer.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.serialization.brigadier; +package com.velocitypowered.proxy.network.java.serialization.brigadier; import com.mojang.brigadier.arguments.IntegerArgumentType; import io.netty.buffer.ByteBuf; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/LongArgumentPropertySerializer.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/LongArgumentPropertySerializer.java similarity index 80% rename from proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/LongArgumentPropertySerializer.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/LongArgumentPropertySerializer.java index e99d8feba..761bddcf0 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/LongArgumentPropertySerializer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/LongArgumentPropertySerializer.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.serialization.brigadier; +package com.velocitypowered.proxy.network.java.serialization.brigadier; -import static com.velocitypowered.proxy.network.serialization.brigadier.IntegerArgumentPropertySerializer.HAS_MAXIMUM; -import static com.velocitypowered.proxy.network.serialization.brigadier.IntegerArgumentPropertySerializer.HAS_MINIMUM; -import static com.velocitypowered.proxy.network.serialization.brigadier.IntegerArgumentPropertySerializer.getFlags; +import static com.velocitypowered.proxy.network.java.serialization.brigadier.IntegerArgumentPropertySerializer.HAS_MAXIMUM; +import static com.velocitypowered.proxy.network.java.serialization.brigadier.IntegerArgumentPropertySerializer.HAS_MINIMUM; +import static com.velocitypowered.proxy.network.java.serialization.brigadier.IntegerArgumentPropertySerializer.getFlags; import com.mojang.brigadier.arguments.LongArgumentType; import io.netty.buffer.ByteBuf; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/ModArgumentProperty.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/ModArgumentProperty.java similarity index 96% rename from proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/ModArgumentProperty.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/ModArgumentProperty.java index a918b819f..7976ec6fe 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/ModArgumentProperty.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/ModArgumentProperty.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.serialization.brigadier; +package com.velocitypowered.proxy.network.java.serialization.brigadier; import com.mojang.brigadier.StringReader; import com.mojang.brigadier.arguments.ArgumentType; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/ModArgumentPropertySerializer.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/ModArgumentPropertySerializer.java similarity index 95% rename from proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/ModArgumentPropertySerializer.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/ModArgumentPropertySerializer.java index d5027af7b..3ece8d525 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/ModArgumentPropertySerializer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/ModArgumentPropertySerializer.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.serialization.brigadier; +package com.velocitypowered.proxy.network.java.serialization.brigadier; import com.velocitypowered.proxy.network.ProtocolUtils; import io.netty.buffer.ByteBuf; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/PassthroughProperty.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/PassthroughProperty.java similarity index 95% rename from proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/PassthroughProperty.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/PassthroughProperty.java index 55f6d73b4..e6dc4f0c3 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/PassthroughProperty.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/PassthroughProperty.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.serialization.brigadier; +package com.velocitypowered.proxy.network.java.serialization.brigadier; import com.mojang.brigadier.StringReader; import com.mojang.brigadier.arguments.ArgumentType; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/StringArgumentPropertySerializer.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/StringArgumentPropertySerializer.java similarity index 96% rename from proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/StringArgumentPropertySerializer.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/StringArgumentPropertySerializer.java index 7c6782c43..a971ba1ee 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/brigadier/StringArgumentPropertySerializer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/brigadier/StringArgumentPropertySerializer.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.serialization.brigadier; +package com.velocitypowered.proxy.network.java.serialization.brigadier; import com.mojang.brigadier.arguments.StringArgumentType; import com.velocitypowered.proxy.network.ProtocolUtils; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/FaviconSerializer.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/json/FaviconSerializer.java similarity index 95% rename from proxy/src/main/java/com/velocitypowered/proxy/network/serialization/FaviconSerializer.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/json/FaviconSerializer.java index 93a26ec9c..3cc09c724 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/FaviconSerializer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/json/FaviconSerializer.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.serialization; +package com.velocitypowered.proxy.network.java.serialization.json; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/JavaPlayerIdentitySerializer.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/json/JavaPlayerIdentitySerializer.java similarity index 97% rename from proxy/src/main/java/com/velocitypowered/proxy/network/serialization/JavaPlayerIdentitySerializer.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/json/JavaPlayerIdentitySerializer.java index 9e388bd14..fcfb3b5d3 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/JavaPlayerIdentitySerializer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/serialization/json/JavaPlayerIdentitySerializer.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.serialization; +package com.velocitypowered.proxy.network.java.serialization.json; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/registry/state/LoginPacketRegistry.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/states/LoginPacketRegistry.java similarity index 78% rename from proxy/src/main/java/com/velocitypowered/proxy/network/registry/state/LoginPacketRegistry.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/states/LoginPacketRegistry.java index 3742762e0..9efd0e84e 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/registry/state/LoginPacketRegistry.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/states/LoginPacketRegistry.java @@ -15,17 +15,16 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.registry.state; +package com.velocitypowered.proxy.network.java.states; -import com.velocitypowered.api.network.ProtocolVersion; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundDisconnectPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundEncryptionRequestPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundLoginPluginMessagePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundServerLoginSuccessPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundSetCompressionPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundEncryptionResponsePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundLoginPluginResponsePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundServerLoginPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundDisconnectPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundEncryptionRequestPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundLoginPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundServerLoginSuccessPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundSetCompressionPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundEncryptionResponsePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundLoginPluginResponsePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundServerLoginPacket; import com.velocitypowered.proxy.network.registry.packet.PacketRegistryBuilder; import com.velocitypowered.proxy.network.registry.packet.PacketRegistryMap; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/registry/state/PlayPacketRegistry.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/states/PlayPacketRegistry.java similarity index 91% rename from proxy/src/main/java/com/velocitypowered/proxy/network/registry/state/PlayPacketRegistry.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/states/PlayPacketRegistry.java index 2c09f4cf2..c4f19c0e6 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/registry/state/PlayPacketRegistry.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/states/PlayPacketRegistry.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.registry.state; +package com.velocitypowered.proxy.network.java.states; import static com.google.common.collect.Iterables.getLast; import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_12; @@ -34,29 +34,29 @@ import static com.velocitypowered.api.network.ProtocolVersion.SUPPORTED_VERSIONS import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.network.ProtocolUtils; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundAvailableCommandsPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundBossBarPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundChatPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundDisconnectPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundHeaderAndFooterPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundJoinGamePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundKeepAlivePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundPlayerListItemPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundResourcePackRequestPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundRespawnPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundTabCompleteResponsePacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundTitlePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundChatPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundClientSettingsPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundKeepAlivePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundPluginMessagePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundResourcePackResponsePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundTabCompleteRequestPacket; import com.velocitypowered.proxy.network.packet.Packet; import com.velocitypowered.proxy.network.packet.PacketDirection; import com.velocitypowered.proxy.network.packet.PacketReader; import com.velocitypowered.proxy.network.packet.PacketWriter; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundAvailableCommandsPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundBossBarPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundChatPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundDisconnectPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundHeaderAndFooterPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundJoinGamePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundKeepAlivePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundPlayerListItemPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundPluginMessagePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundResourcePackRequestPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundRespawnPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundTabCompleteResponsePacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundTitlePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundChatPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundClientSettingsPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundKeepAlivePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundPluginMessagePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundResourcePackResponsePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundTabCompleteRequestPacket; import com.velocitypowered.proxy.network.registry.packet.PacketRegistryMap; import com.velocitypowered.proxy.network.registry.protocol.ProtocolRegistry; import io.netty.buffer.ByteBuf; @@ -68,7 +68,6 @@ import java.util.EnumMap; import java.util.EnumSet; import java.util.HashMap; import java.util.Map; -import java.util.Map.Entry; import java.util.Objects; import org.checkerframework.checker.nullness.qual.Nullable; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/registry/state/ProtocolStates.java b/proxy/src/main/java/com/velocitypowered/proxy/network/java/states/ProtocolStates.java similarity index 85% rename from proxy/src/main/java/com/velocitypowered/proxy/network/registry/state/ProtocolStates.java rename to proxy/src/main/java/com/velocitypowered/proxy/network/java/states/ProtocolStates.java index 24d3ba8be..b5b711cbd 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/registry/state/ProtocolStates.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/java/states/ProtocolStates.java @@ -15,14 +15,14 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.registry.state; +package com.velocitypowered.proxy.network.java.states; import com.velocitypowered.api.network.ProtocolVersion; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundStatusPingPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundStatusResponsePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundHandshakePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundStatusPingPacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundStatusRequestPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundStatusPingPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundStatusResponsePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundHandshakePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundStatusPingPacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundStatusRequestPacket; import com.velocitypowered.proxy.network.registry.packet.EmptyPacketRegistryMap; import com.velocitypowered.proxy.network.registry.packet.PacketRegistryBuilder; import com.velocitypowered.proxy.network.registry.protocol.ProtocolRegistry; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/Packet.java b/proxy/src/main/java/com/velocitypowered/proxy/network/packet/Packet.java index 89740e4e4..0ba0db740 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/packet/Packet.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/packet/Packet.java @@ -18,6 +18,7 @@ package com.velocitypowered.proxy.network.packet; import com.velocitypowered.api.network.ProtocolVersion; +import com.velocitypowered.proxy.network.java.packet.JavaPacketHandler; import io.netty.buffer.ByteBuf; public interface Packet { @@ -32,5 +33,5 @@ public interface Packet { throw new UnsupportedOperationException(); } - boolean handle(PacketHandler handler); + boolean handle(JavaPacketHandler handler); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/plugin/loader/java/JavaPluginLoader.java b/proxy/src/main/java/com/velocitypowered/proxy/plugin/loader/java/JavaPluginLoader.java index 9fe592a1d..451188186 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/plugin/loader/java/JavaPluginLoader.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/plugin/loader/java/JavaPluginLoader.java @@ -51,7 +51,6 @@ import java.util.Map; import java.util.Set; import java.util.jar.JarEntry; import java.util.jar.JarInputStream; -import org.checkerframework.checker.nullness.qual.Nullable; public class JavaPluginLoader implements PluginLoader { diff --git a/proxy/src/main/java/com/velocitypowered/proxy/plugin/loader/java/VelocityPluginModule.java b/proxy/src/main/java/com/velocitypowered/proxy/plugin/loader/java/VelocityPluginModule.java index e561c3766..2b80c455c 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/plugin/loader/java/VelocityPluginModule.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/plugin/loader/java/VelocityPluginModule.java @@ -23,7 +23,6 @@ import com.google.inject.Scopes; import com.velocitypowered.api.plugin.PluginContainer; import com.velocitypowered.api.plugin.PluginDescription; import com.velocitypowered.api.plugin.annotation.DataDirectory; -import com.velocitypowered.api.proxy.ProxyServer; import java.nio.file.Path; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/server/PingSessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/server/PingSessionHandler.java index 7a2b3daca..aa2695e85 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/server/PingSessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/server/PingSessionHandler.java @@ -23,10 +23,10 @@ import com.velocitypowered.api.proxy.server.ServerPing; import com.velocitypowered.proxy.VelocityServer; import com.velocitypowered.proxy.connection.MinecraftConnection; import com.velocitypowered.proxy.connection.MinecraftSessionHandler; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundStatusResponsePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundHandshakePacket; -import com.velocitypowered.proxy.network.packet.serverbound.ServerboundStatusRequestPacket; -import com.velocitypowered.proxy.network.registry.state.ProtocolStates; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundStatusResponsePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundHandshakePacket; +import com.velocitypowered.proxy.network.java.packet.serverbound.ServerboundStatusRequestPacket; +import com.velocitypowered.proxy.network.java.states.ProtocolStates; import java.io.IOException; import java.net.InetSocketAddress; import java.net.SocketAddress; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/server/VelocityRegisteredServer.java b/proxy/src/main/java/com/velocitypowered/proxy/server/VelocityRegisteredServer.java index 47701ea9a..465613230 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/server/VelocityRegisteredServer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/server/VelocityRegisteredServer.java @@ -36,11 +36,11 @@ import com.velocitypowered.proxy.VelocityServer; import com.velocitypowered.proxy.connection.MinecraftConnection; import com.velocitypowered.proxy.connection.backend.VelocityServerConnection; import com.velocitypowered.proxy.connection.client.ConnectedPlayer; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftDecoder; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftEncoder; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftVarintFrameDecoder; +import com.velocitypowered.proxy.network.java.pipeline.MinecraftVarintLengthEncoder; import com.velocitypowered.proxy.network.packet.PacketDirection; -import com.velocitypowered.proxy.network.pipeline.MinecraftDecoder; -import com.velocitypowered.proxy.network.pipeline.MinecraftEncoder; -import com.velocitypowered.proxy.network.pipeline.MinecraftVarintFrameDecoder; -import com.velocitypowered.proxy.network.pipeline.MinecraftVarintLengthEncoder; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.Channel; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabList.java b/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabList.java index 725cfeaa4..3c05d6c66 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabList.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabList.java @@ -24,8 +24,8 @@ import com.velocitypowered.api.proxy.player.java.JavaPlayerIdentity; import com.velocitypowered.proxy.connection.MinecraftConnection; import com.velocitypowered.proxy.connection.client.ConnectedPlayer; import com.velocitypowered.proxy.network.ProtocolUtils; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundHeaderAndFooterPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundPlayerListItemPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundHeaderAndFooterPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundPlayerListItemPacket; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabListEntry.java b/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabListEntry.java index bcd12870d..5ed098d4e 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabListEntry.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabListEntry.java @@ -20,7 +20,7 @@ package com.velocitypowered.proxy.tablist; import com.velocitypowered.api.proxy.player.TabList; import com.velocitypowered.api.proxy.player.TabListEntry; import com.velocitypowered.api.proxy.player.java.JavaPlayerIdentity; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundPlayerListItemPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundPlayerListItemPacket; import net.kyori.adventure.text.Component; import org.checkerframework.checker.nullness.qual.Nullable; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabListLegacy.java b/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabListLegacy.java index d48681ad7..c14b94835 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabListLegacy.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabListLegacy.java @@ -21,8 +21,8 @@ import com.google.common.collect.ImmutableList; import com.velocitypowered.api.proxy.player.TabListEntry; import com.velocitypowered.api.proxy.player.java.JavaPlayerIdentity; import com.velocitypowered.proxy.connection.client.ConnectedPlayer; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundPlayerListItemPacket; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundPlayerListItemPacket.Item; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundPlayerListItemPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundPlayerListItemPacket.Item; import java.util.Collections; import java.util.Map; import java.util.UUID; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/VelocityLegacyHoverEventSerializer.java b/proxy/src/main/java/com/velocitypowered/proxy/util/adventure/VelocityLegacyHoverEventSerializer.java similarity index 98% rename from proxy/src/main/java/com/velocitypowered/proxy/network/serialization/VelocityLegacyHoverEventSerializer.java rename to proxy/src/main/java/com/velocitypowered/proxy/util/adventure/VelocityLegacyHoverEventSerializer.java index f0d6208f9..4b756e848 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/serialization/VelocityLegacyHoverEventSerializer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/util/adventure/VelocityLegacyHoverEventSerializer.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.velocitypowered.proxy.network.serialization; +package com.velocitypowered.proxy.util.adventure; import java.io.IOException; import java.util.UUID; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/util/bossbar/AdventureBossBarManager.java b/proxy/src/main/java/com/velocitypowered/proxy/util/bossbar/AdventureBossBarManager.java index 23ce2481b..d4d427816 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/util/bossbar/AdventureBossBarManager.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/util/bossbar/AdventureBossBarManager.java @@ -21,7 +21,7 @@ import com.google.common.collect.MapMaker; import com.velocitypowered.api.network.ProtocolVersion; import com.velocitypowered.proxy.connection.client.ConnectedPlayer; import com.velocitypowered.proxy.network.ProtocolUtils; -import com.velocitypowered.proxy.network.packet.clientbound.ClientboundBossBarPacket; +import com.velocitypowered.proxy.network.java.packet.clientbound.ClientboundBossBarPacket; import com.velocitypowered.proxy.util.collect.Enum2IntMap; import com.velocitypowered.proxy.util.concurrent.Once; import java.util.Collections; diff --git a/proxy/src/test/java/com/velocitypowered/proxy/command/CommandManagerTests.java b/proxy/src/test/java/com/velocitypowered/proxy/command/CommandManagerTests.java index 158aa8b35..35ce5b9f4 100644 --- a/proxy/src/test/java/com/velocitypowered/proxy/command/CommandManagerTests.java +++ b/proxy/src/test/java/com/velocitypowered/proxy/command/CommandManagerTests.java @@ -20,7 +20,6 @@ package com.velocitypowered.proxy.command; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; diff --git a/proxy/src/test/java/com/velocitypowered/proxy/network/PluginMessageUtilTest.java b/proxy/src/test/java/com/velocitypowered/proxy/network/PluginMessageUtilTest.java index bc9031ffc..29b42ae64 100644 --- a/proxy/src/test/java/com/velocitypowered/proxy/network/PluginMessageUtilTest.java +++ b/proxy/src/test/java/com/velocitypowered/proxy/network/PluginMessageUtilTest.java @@ -19,6 +19,7 @@ package com.velocitypowered.proxy.network; import static org.junit.jupiter.api.Assertions.assertEquals; +import com.velocitypowered.proxy.network.java.PluginMessageUtil; import org.junit.jupiter.api.Test; class PluginMessageUtilTest {