diff --git a/api/src/main/java/com/velocitypowered/api/servers/ServerInfo.java b/api/src/main/java/com/velocitypowered/api/server/ServerInfo.java similarity index 97% rename from api/src/main/java/com/velocitypowered/api/servers/ServerInfo.java rename to api/src/main/java/com/velocitypowered/api/server/ServerInfo.java index 2bb8000bc..8bab632d0 100644 --- a/api/src/main/java/com/velocitypowered/api/servers/ServerInfo.java +++ b/api/src/main/java/com/velocitypowered/api/server/ServerInfo.java @@ -1,4 +1,4 @@ -package com.velocitypowered.api.servers; +package com.velocitypowered.api.server; import com.google.common.base.Preconditions; diff --git a/native/src/main/java/com/velocitypowered/natives/compression/NativeVelocityCompressor.java b/native/src/main/java/com/velocitypowered/natives/compression/NativeVelocityCompressor.java index d529900b4..77ae9a935 100644 --- a/native/src/main/java/com/velocitypowered/natives/compression/NativeVelocityCompressor.java +++ b/native/src/main/java/com/velocitypowered/natives/compression/NativeVelocityCompressor.java @@ -4,6 +4,7 @@ import com.google.common.base.Preconditions; import io.netty.buffer.ByteBuf; import java.util.zip.DataFormatException; +import java.util.zip.Deflater; public class NativeVelocityCompressor implements VelocityCompressor { private final NativeZlibInflate inflate = new NativeZlibInflate(); @@ -14,7 +15,7 @@ public class NativeVelocityCompressor implements VelocityCompressor { public NativeVelocityCompressor() { this.inflateCtx = inflate.init(); - this.deflateCtx = deflate.init(7); + this.deflateCtx = deflate.init(Deflater.DEFAULT_COMPRESSION); } @Override diff --git a/native/src/test/java/com/velocitypowered/natives/compression/VelocityCompressorTest.java b/native/src/test/java/com/velocitypowered/natives/compression/VelocityCompressorTest.java index bd9b0f991..5641ee9ba 100644 --- a/native/src/test/java/com/velocitypowered/natives/compression/VelocityCompressorTest.java +++ b/native/src/test/java/com/velocitypowered/natives/compression/VelocityCompressorTest.java @@ -9,6 +9,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledOnOs; import java.util.Random; +import java.util.function.Supplier; import java.util.zip.DataFormatException; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -29,19 +30,19 @@ class VelocityCompressorTest { if (compressor instanceof JavaVelocityCompressor) { fail("Loaded regular compressor"); } - check(compressor); + check(compressor, Unpooled::directBuffer); } @Test void javaIntegrityCheck() throws DataFormatException { JavaVelocityCompressor compressor = new JavaVelocityCompressor(); - check(compressor); + check(compressor, Unpooled::buffer); } - private void check(VelocityCompressor compressor) throws DataFormatException { - ByteBuf source = Unpooled.directBuffer(); - ByteBuf dest = Unpooled.directBuffer(); - ByteBuf decompressed = Unpooled.directBuffer(); + private void check(VelocityCompressor compressor, Supplier supplier) throws DataFormatException { + ByteBuf source = supplier.get(); + ByteBuf dest = supplier.get(); + ByteBuf decompressed = supplier.get(); Random random = new Random(1); byte[] randomBytes = new byte[1 << 16]; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java index 45c005e1a..dfbbc3107 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java @@ -6,7 +6,7 @@ import com.velocitypowered.natives.util.Natives; import com.velocitypowered.network.ConnectionManager; import com.velocitypowered.proxy.config.VelocityConfiguration; import com.velocitypowered.proxy.connection.http.NettyHttpClient; -import com.velocitypowered.api.servers.ServerInfo; +import com.velocitypowered.api.server.ServerInfo; import com.velocitypowered.proxy.util.AddressUtil; import com.velocitypowered.proxy.util.EncryptionUtils; import com.velocitypowered.proxy.util.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 683f6d1a0..50c85c52d 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java @@ -5,7 +5,6 @@ import com.velocitypowered.natives.compression.VelocityCompressor; import com.velocitypowered.natives.util.Natives; import com.velocitypowered.proxy.protocol.PacketWrapper; import com.velocitypowered.proxy.protocol.StateRegistry; -import com.velocitypowered.natives.compression.JavaVelocityCompressor; import com.velocitypowered.natives.encryption.JavaVelocityCipher; import com.velocitypowered.natives.encryption.VelocityCipher; import com.velocitypowered.proxy.protocol.netty.*; 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 598157937..8348fa5b7 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 @@ -3,7 +3,7 @@ package com.velocitypowered.proxy.connection.backend; import com.velocitypowered.proxy.connection.client.ClientPlaySessionHandler; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; -import com.velocitypowered.proxy.protocol.packets.*; +import com.velocitypowered.proxy.protocol.packet.*; import com.velocitypowered.proxy.connection.MinecraftSessionHandler; import com.velocitypowered.proxy.protocol.util.PluginMessageUtil; 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 098a2b1fb..ad0f1b1ce 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 @@ -8,7 +8,7 @@ import com.velocitypowered.proxy.data.GameProfile; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolUtils; import com.velocitypowered.proxy.protocol.StateRegistry; -import com.velocitypowered.proxy.protocol.packets.*; +import com.velocitypowered.proxy.protocol.packet.*; import com.velocitypowered.proxy.connection.MinecraftSessionHandler; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/ServerConnection.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/ServerConnection.java index 829325d01..794d94e7a 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/ServerConnection.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/ServerConnection.java @@ -7,11 +7,11 @@ import com.velocitypowered.proxy.protocol.netty.MinecraftDecoder; import com.velocitypowered.proxy.protocol.netty.MinecraftEncoder; import com.velocitypowered.proxy.protocol.netty.MinecraftVarintFrameDecoder; import com.velocitypowered.proxy.protocol.netty.MinecraftVarintLengthEncoder; -import com.velocitypowered.proxy.protocol.packets.Handshake; -import com.velocitypowered.proxy.protocol.packets.ServerLogin; +import com.velocitypowered.proxy.protocol.packet.Handshake; +import com.velocitypowered.proxy.protocol.packet.ServerLogin; import com.velocitypowered.proxy.connection.MinecraftConnection; import com.velocitypowered.proxy.protocol.StateRegistry; -import com.velocitypowered.api.servers.ServerInfo; +import com.velocitypowered.api.server.ServerInfo; import com.velocitypowered.proxy.VelocityServer; import com.velocitypowered.proxy.connection.client.ConnectedPlayer; import io.netty.channel.*; 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 8d5ca2ef0..662ab4403 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 @@ -2,14 +2,14 @@ package com.velocitypowered.proxy.connection.client; import com.velocitypowered.proxy.VelocityServer; import com.velocitypowered.proxy.connection.backend.ServerConnection; -import com.velocitypowered.api.servers.ServerInfo; +import com.velocitypowered.api.server.ServerInfo; import com.velocitypowered.proxy.data.scoreboard.Objective; import com.velocitypowered.proxy.data.scoreboard.Score; import com.velocitypowered.proxy.data.scoreboard.Scoreboard; import com.velocitypowered.proxy.data.scoreboard.Team; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; -import com.velocitypowered.proxy.protocol.packets.*; +import com.velocitypowered.proxy.protocol.packet.*; import com.velocitypowered.proxy.connection.MinecraftSessionHandler; import com.velocitypowered.proxy.protocol.remap.EntityIdRemapper; import com.velocitypowered.proxy.protocol.util.PluginMessageUtil; 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 61e138c72..4824860bf 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 @@ -4,13 +4,13 @@ import com.google.common.base.Preconditions; import com.velocitypowered.proxy.VelocityServer; import com.velocitypowered.proxy.connection.MinecraftConnectionAssociation; import com.velocitypowered.proxy.data.GameProfile; -import com.velocitypowered.proxy.protocol.packets.Chat; +import com.velocitypowered.proxy.protocol.packet.Chat; import com.velocitypowered.proxy.connection.MinecraftConnection; import com.velocitypowered.proxy.connection.backend.ServerConnection; -import com.velocitypowered.proxy.protocol.packets.ClientSettings; +import com.velocitypowered.proxy.protocol.packet.ClientSettings; import com.velocitypowered.proxy.util.ThrowableUtils; -import com.velocitypowered.api.servers.ServerInfo; -import com.velocitypowered.proxy.protocol.packets.Disconnect; +import com.velocitypowered.api.server.ServerInfo; +import com.velocitypowered.proxy.protocol.packet.Disconnect; import net.kyori.text.Component; import net.kyori.text.TextComponent; import net.kyori.text.TranslatableComponent; 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 d2d1e2c72..1b9ca2ba7 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 @@ -6,8 +6,8 @@ import com.velocitypowered.proxy.connection.MinecraftSessionHandler; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; import com.velocitypowered.proxy.protocol.StateRegistry; -import com.velocitypowered.proxy.protocol.packets.Disconnect; -import com.velocitypowered.proxy.protocol.packets.Handshake; +import com.velocitypowered.proxy.protocol.packet.Disconnect; +import com.velocitypowered.proxy.protocol.packet.Handshake; import net.kyori.text.TranslatableComponent; public class HandshakeSessionHandler implements MinecraftSessionHandler { 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 1640e1d69..4362991f8 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 @@ -6,11 +6,11 @@ import com.velocitypowered.proxy.data.GameProfile; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; import com.velocitypowered.proxy.protocol.StateRegistry; -import com.velocitypowered.proxy.protocol.packets.*; +import com.velocitypowered.proxy.protocol.packet.*; import com.velocitypowered.proxy.connection.MinecraftConnection; import com.velocitypowered.proxy.connection.MinecraftSessionHandler; import com.velocitypowered.proxy.VelocityServer; -import com.velocitypowered.api.servers.ServerInfo; +import com.velocitypowered.api.server.ServerInfo; import com.velocitypowered.proxy.util.EncryptionUtils; import io.netty.buffer.Unpooled; import net.kyori.text.TextComponent; 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 e217393cf..1dee26ce4 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 @@ -4,10 +4,9 @@ import com.google.common.base.Preconditions; import com.velocitypowered.proxy.VelocityServer; import com.velocitypowered.proxy.config.VelocityConfiguration; import com.velocitypowered.proxy.protocol.MinecraftPacket; -import com.velocitypowered.proxy.protocol.packets.KeepAlive; -import com.velocitypowered.proxy.protocol.packets.StatusPing; -import com.velocitypowered.proxy.protocol.packets.StatusRequest; -import com.velocitypowered.proxy.protocol.packets.StatusResponse; +import com.velocitypowered.proxy.protocol.packet.StatusPing; +import com.velocitypowered.proxy.protocol.packet.StatusRequest; +import com.velocitypowered.proxy.protocol.packet.StatusResponse; import com.velocitypowered.proxy.connection.MinecraftConnection; import com.velocitypowered.proxy.data.ServerPing; import com.velocitypowered.proxy.connection.MinecraftSessionHandler; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/StateRegistry.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/StateRegistry.java index 7bf504322..891cdf8c9 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/StateRegistry.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/StateRegistry.java @@ -1,6 +1,6 @@ package com.velocitypowered.proxy.protocol; -import com.velocitypowered.proxy.protocol.packets.*; +import com.velocitypowered.proxy.protocol.packet.*; import io.netty.util.collection.IntObjectHashMap; import io.netty.util.collection.IntObjectMap; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/LegacyPingDecoder.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/LegacyPingDecoder.java index 35369ccf8..46e41a519 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/LegacyPingDecoder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/LegacyPingDecoder.java @@ -1,6 +1,6 @@ package com.velocitypowered.proxy.protocol.netty; -import com.velocitypowered.proxy.protocol.packets.LegacyPing; +import com.velocitypowered.proxy.protocol.packet.LegacyPing; 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/protocol/netty/LegacyPingEncoder.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/LegacyPingEncoder.java index 3aa580d17..6ef41fe51 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/LegacyPingEncoder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/LegacyPingEncoder.java @@ -2,9 +2,8 @@ package com.velocitypowered.proxy.protocol.netty; import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; -import com.velocitypowered.proxy.protocol.packets.LegacyPingResponse; +import com.velocitypowered.proxy.protocol.packet.LegacyPingResponse; import io.netty.buffer.ByteBuf; -import io.netty.buffer.ByteBufUtil; import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.MessageToByteEncoder; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftCompressEncoder.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftCompressEncoder.java index ac3eac297..775ea3e02 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftCompressEncoder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftCompressEncoder.java @@ -4,7 +4,6 @@ import com.velocitypowered.proxy.protocol.ProtocolUtils; import com.velocitypowered.natives.compression.VelocityCompressor; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelPromise; import io.netty.handler.codec.MessageToByteEncoder; public class MinecraftCompressEncoder extends MessageToByteEncoder { diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/BossBar.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/BossBar.java similarity index 98% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/BossBar.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/BossBar.java index 271b94196..c300e1b40 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/BossBar.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/BossBar.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/Chat.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/Chat.java similarity index 97% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/Chat.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/Chat.java index e57a80a4e..c3de9c6b9 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/Chat.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/Chat.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.google.common.base.Preconditions; import com.velocitypowered.proxy.protocol.ProtocolConstants; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ClientSettings.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ClientSettings.java similarity index 98% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ClientSettings.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ClientSettings.java index 77b92bc7f..74ca21bf8 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ClientSettings.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ClientSettings.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/Disconnect.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/Disconnect.java similarity index 96% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/Disconnect.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/Disconnect.java index 7c33de4d0..1420b7981 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/Disconnect.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/Disconnect.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.google.common.base.Preconditions; import com.velocitypowered.proxy.protocol.ProtocolConstants; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/EncryptionRequest.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/EncryptionRequest.java similarity index 96% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/EncryptionRequest.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/EncryptionRequest.java index 509621dca..32b8321ff 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/EncryptionRequest.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/EncryptionRequest.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/EncryptionResponse.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/EncryptionResponse.java similarity index 96% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/EncryptionResponse.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/EncryptionResponse.java index 6c87fbb4e..0df20b1ae 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/EncryptionResponse.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/EncryptionResponse.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/Handshake.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/Handshake.java similarity index 97% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/Handshake.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/Handshake.java index f75b33896..2e49d1a98 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/Handshake.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/Handshake.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.ProtocolConstants; import com.velocitypowered.proxy.protocol.MinecraftPacket; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/JoinGame.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/JoinGame.java similarity index 98% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/JoinGame.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/JoinGame.java index b5c633f75..100950a74 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/JoinGame.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/JoinGame.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/KeepAlive.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/KeepAlive.java similarity index 96% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/KeepAlive.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/KeepAlive.java index 9197c2691..638b15d52 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/KeepAlive.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/KeepAlive.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.ProtocolConstants; import com.velocitypowered.proxy.protocol.MinecraftPacket; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/LegacyPing.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/LegacyPing.java new file mode 100644 index 000000000..ea75cd214 --- /dev/null +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/LegacyPing.java @@ -0,0 +1,4 @@ +package com.velocitypowered.proxy.protocol.packet; + +public class LegacyPing { +} diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/LegacyPingResponse.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/LegacyPingResponse.java similarity index 97% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/LegacyPingResponse.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/LegacyPingResponse.java index e1246d005..7e0491b2a 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/LegacyPingResponse.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/LegacyPingResponse.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.data.ServerPing; import net.kyori.text.serializer.ComponentSerializers; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/LoginPluginMessage.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/LoginPluginMessage.java similarity index 96% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/LoginPluginMessage.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/LoginPluginMessage.java index c0fbdfa8e..395efe5ea 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/LoginPluginMessage.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/LoginPluginMessage.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/LoginPluginResponse.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/LoginPluginResponse.java similarity index 96% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/LoginPluginResponse.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/LoginPluginResponse.java index d60247b75..ce532cbd1 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/LoginPluginResponse.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/LoginPluginResponse.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/PluginMessage.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/PluginMessage.java similarity index 96% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/PluginMessage.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/PluginMessage.java index eb4623de7..7ff506651 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/PluginMessage.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/PluginMessage.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/Respawn.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/Respawn.java similarity index 97% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/Respawn.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/Respawn.java index 8c3f0dbc9..8de02919c 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/Respawn.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/Respawn.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ScoreboardDisplay.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ScoreboardDisplay.java similarity index 96% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ScoreboardDisplay.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ScoreboardDisplay.java index 1abff8745..8f22abeb5 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ScoreboardDisplay.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ScoreboardDisplay.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ScoreboardObjective.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ScoreboardObjective.java similarity index 98% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ScoreboardObjective.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ScoreboardObjective.java index 2778ae8da..f27bd94a1 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ScoreboardObjective.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ScoreboardObjective.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.data.scoreboard.ObjectiveMode; import com.velocitypowered.proxy.protocol.MinecraftPacket; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ScoreboardSetScore.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ScoreboardSetScore.java similarity index 97% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ScoreboardSetScore.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ScoreboardSetScore.java index 068af1baa..264d9eec2 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ScoreboardSetScore.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ScoreboardSetScore.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ScoreboardTeam.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ScoreboardTeam.java similarity index 99% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ScoreboardTeam.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ScoreboardTeam.java index 7094fecbd..25a0b6bb3 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ScoreboardTeam.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ScoreboardTeam.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ServerLogin.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ServerLogin.java similarity index 94% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ServerLogin.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ServerLogin.java index 816ed6497..459afe338 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ServerLogin.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ServerLogin.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.ProtocolConstants; import com.velocitypowered.proxy.protocol.MinecraftPacket; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ServerLoginSuccess.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ServerLoginSuccess.java similarity index 96% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ServerLoginSuccess.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ServerLoginSuccess.java index 64a7dac55..1bf35edd7 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/ServerLoginSuccess.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ServerLoginSuccess.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/SetCompression.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/SetCompression.java similarity index 95% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/SetCompression.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/SetCompression.java index 4892c022b..8157bf4ec 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/SetCompression.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/SetCompression.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/StatusPing.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/StatusPing.java similarity index 91% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/StatusPing.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/StatusPing.java index 5d55e002a..65bf532e3 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/StatusPing.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/StatusPing.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.ProtocolConstants; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/StatusRequest.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/StatusRequest.java similarity index 89% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/StatusRequest.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/StatusRequest.java index c52f76797..c53276e5a 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/StatusRequest.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/StatusRequest.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.ProtocolConstants; import com.velocitypowered.proxy.protocol.MinecraftPacket; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/StatusResponse.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/StatusResponse.java similarity index 94% rename from proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/StatusResponse.java rename to proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/StatusResponse.java index 9ec80faaa..75a052258 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/StatusResponse.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/StatusResponse.java @@ -1,4 +1,4 @@ -package com.velocitypowered.proxy.protocol.packets; +package com.velocitypowered.proxy.protocol.packet; import com.velocitypowered.proxy.protocol.ProtocolConstants; import com.velocitypowered.proxy.protocol.MinecraftPacket; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/LegacyPing.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/LegacyPing.java deleted file mode 100644 index 4aa629dcd..000000000 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packets/LegacyPing.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.velocitypowered.proxy.protocol.packets; - -public class LegacyPing { -} diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/util/PluginMessageUtil.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/util/PluginMessageUtil.java index f865ffac7..92eb04e87 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/util/PluginMessageUtil.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/util/PluginMessageUtil.java @@ -3,7 +3,7 @@ package com.velocitypowered.proxy.protocol.util; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.velocitypowered.proxy.protocol.ProtocolUtils; -import com.velocitypowered.proxy.protocol.packets.PluginMessage; +import com.velocitypowered.proxy.protocol.packet.PluginMessage; 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/util/ServerMap.java b/proxy/src/main/java/com/velocitypowered/proxy/util/ServerMap.java index d78b5f305..eb0948c26 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/util/ServerMap.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/util/ServerMap.java @@ -2,7 +2,7 @@ package com.velocitypowered.proxy.util; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; -import com.velocitypowered.api.servers.ServerInfo; +import com.velocitypowered.api.server.ServerInfo; import java.util.Collection; import java.util.HashMap; diff --git a/proxy/src/test/java/com/velocitypowered/proxy/protocol/PacketRegistryTest.java b/proxy/src/test/java/com/velocitypowered/proxy/protocol/PacketRegistryTest.java index b332f8f14..187679f6c 100644 --- a/proxy/src/test/java/com/velocitypowered/proxy/protocol/PacketRegistryTest.java +++ b/proxy/src/test/java/com/velocitypowered/proxy/protocol/PacketRegistryTest.java @@ -1,6 +1,6 @@ package com.velocitypowered.proxy.protocol; -import com.velocitypowered.proxy.protocol.packets.Handshake; +import com.velocitypowered.proxy.protocol.packet.Handshake; import org.junit.jupiter.api.Test; import static com.velocitypowered.proxy.protocol.ProtocolConstants.MINECRAFT_1_12;