CVE-2021-39177 (published 2021-08-30T23:15Z)

Geyser is a bridge between Minecraft: Bedrock Edition and Minecraft: Java Edition. Versions of Geyser prior to 1.4.2-SNAPSHOT allow anyone that can connect to the server to forge a LoginPacket with manipulated JWT token allowing impersonation as any user. Version 1.4.2-SNAPSHOT contains a patch for the issue. There are no known workarounds aside from upgrading.

Severity: HIGH
CVSS v2 base score: 7.5 (AV:N/AC:L/Au:N/C:P/I:P/A:P)
CVSS v3 base score: 9.8, CRITICAL (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)

Weakness information:
cwe_id: CWE-287
cwe_name: Improper Authentication
description: When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.
extended_description: 
            
			
         
         

Fix information:
repo_url: https://github.com/GeyserMC/Geyser
commit_details: repo_url: https://github.com/GeyserMC/Geyser
author: Camotoy
author_date: 2021-08-30 13:55:01-04:00
msg: Bump version to try and fix deploying; other nitpicks
repository: repo_url: https://github.com/GeyserMC/Geyser
repo_name: GeyserMC/Geyser
description: A bridge/proxy allowing you to connect to Minecraft: Java Edition servers with Minecraft: Bedrock Edition.
repo_language: Java
owner: GeyserMC
file_changes: filename: Jenkinsfile
change_type: ModificationType.MODIFY
diff: @@ -20,7 +20,7 @@ pipeline {
             }
         }
 
-        /*stage ('Deploy') {
+        stage ('Deploy') {
             when {
                 branch "master"
             }
@@ -48,7 +48,7 @@ pipeline {
                         serverId: "opencollab-artifactory"
                 )
             }
-        }*/
+        }
     }
 
     post {

programming_language: JavaScript
filename: pom.xml
change_type: ModificationType.MODIFY
diff: @@ -6,9 +6,9 @@
     <parent>
         <groupId>org.geysermc</groupId>
         <artifactId>geyser-parent</artifactId>
-        <version>1.4.1-SNAPSHOT</version>
+        <version>1.4.2-SNAPSHOT</version>
     </parent>
 
     <artifactId>ap</artifactId>
-    <version>1.4.1-SNAPSHOT</version>
+    <version>1.4.2-SNAPSHOT</version>
 </project>
\ No newline at end of file

programming_language: Markdown
filename: pom.xml
change_type: ModificationType.MODIFY
diff: @@ -6,7 +6,7 @@
     <parent>
         <groupId>org.geysermc</groupId>
         <artifactId>bootstrap-parent</artifactId>
-        <version>1.4.1-SNAPSHOT</version>
+        <version>1.4.2-SNAPSHOT</version>
     </parent>
     <artifactId>bootstrap-bungeecord</artifactId>
 
@@ -14,7 +14,7 @@
         <dependency>
             <groupId>org.geysermc</groupId>
             <artifactId>connector</artifactId>
-            <version>1.4.1-SNAPSHOT</version>
+            <version>1.4.2-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
         <!-- Used for better working with internals without reflection -->

programming_language: HTML
filename: pom.xml
change_type: ModificationType.MODIFY
diff: @@ -6,7 +6,7 @@
     <parent>
         <groupId>org.geysermc</groupId>
         <artifactId>geyser-parent</artifactId>
-        <version>1.4.1-SNAPSHOT</version>
+        <version>1.4.2-SNAPSHOT</version>
     </parent>
     <artifactId>bootstrap-parent</artifactId>
     <packaging>pom</packaging>
@@ -34,7 +34,7 @@
         <dependency>
             <groupId>org.geysermc</groupId>
             <artifactId>ap</artifactId>
-            <version>1.4.1-SNAPSHOT</version>
+            <version>1.4.2-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
     </dependencies>

programming_language: HTML
filename: pom.xml
change_type: ModificationType.MODIFY
diff: @@ -6,7 +6,7 @@
     <parent>
         <groupId>org.geysermc</groupId>
         <artifactId>bootstrap-parent</artifactId>
-        <version>1.4.1-SNAPSHOT</version>
+        <version>1.4.2-SNAPSHOT</version>
     </parent>
     <artifactId>bootstrap-spigot</artifactId>
 
@@ -21,7 +21,7 @@
         <dependency>
             <groupId>org.geysermc</groupId>
             <artifactId>connector</artifactId>
-            <version>1.4.1-SNAPSHOT</version>
+            <version>1.4.2-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
         <dependency>

programming_language: HTML
filename: pom.xml
change_type: ModificationType.MODIFY
diff: @@ -6,7 +6,7 @@
     <parent>
         <groupId>org.geysermc</groupId>
         <artifactId>bootstrap-parent</artifactId>
-        <version>1.4.1-SNAPSHOT</version>
+        <version>1.4.2-SNAPSHOT</version>
     </parent>
     <artifactId>bootstrap-sponge</artifactId>
 
@@ -14,7 +14,7 @@
         <dependency>
             <groupId>org.geysermc</groupId>
             <artifactId>connector</artifactId>
-            <version>1.4.1-SNAPSHOT</version>
+            <version>1.4.2-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
         <dependency>

programming_language: HTML
filename: pom.xml
change_type: ModificationType.MODIFY
diff: @@ -6,7 +6,7 @@
     <parent>
         <groupId>org.geysermc</groupId>
         <artifactId>bootstrap-parent</artifactId>
-        <version>1.4.1-SNAPSHOT</version>
+        <version>1.4.2-SNAPSHOT</version>
     </parent>
     <artifactId>bootstrap-standalone</artifactId>
 
@@ -14,7 +14,7 @@
         <dependency>
             <groupId>org.geysermc</groupId>
             <artifactId>connector</artifactId>
-            <version>1.4.1-SNAPSHOT</version>
+            <version>1.4.2-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
         <dependency>

programming_language: HTML
filename: pom.xml
change_type: ModificationType.MODIFY
diff: @@ -6,7 +6,7 @@
     <parent>
         <groupId>org.geysermc</groupId>
         <artifactId>bootstrap-parent</artifactId>
-        <version>1.4.1-SNAPSHOT</version>
+        <version>1.4.2-SNAPSHOT</version>
     </parent>
     <artifactId>bootstrap-velocity</artifactId>
 
@@ -14,7 +14,7 @@
         <dependency>
             <groupId>org.geysermc</groupId>
             <artifactId>connector</artifactId>
-            <version>1.4.1-SNAPSHOT</version>
+            <version>1.4.2-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
         <dependency>

programming_language: HTML
filename: pom.xml
change_type: ModificationType.MODIFY
diff: @@ -6,7 +6,7 @@
     <parent>
         <groupId>org.geysermc</groupId>
         <artifactId>geyser-parent</artifactId>
-        <version>1.4.1-SNAPSHOT</version>
+        <version>1.4.2-SNAPSHOT</version>
     </parent>
     <artifactId>common</artifactId>
 

programming_language: HTML
filename: pom.xml
change_type: ModificationType.MODIFY
diff: @@ -6,7 +6,7 @@
     <parent>
         <groupId>org.geysermc</groupId>
         <artifactId>geyser-parent</artifactId>
-        <version>1.4.1-SNAPSHOT</version>
+        <version>1.4.2-SNAPSHOT</version>
     </parent>
     <artifactId>connector</artifactId>
 
@@ -21,13 +21,13 @@
         <dependency>
             <groupId>org.geysermc</groupId>
             <artifactId>ap</artifactId>
-            <version>1.4.1-SNAPSHOT</version>
+            <version>1.4.2-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.geysermc</groupId>
             <artifactId>common</artifactId>
-            <version>1.4.1-SNAPSHOT</version>
+            <version>1.4.2-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
         <!-- Jackson JSON and YAML serialization -->
@@ -115,7 +115,7 @@
         <dependency>
             <groupId>com.github.CloudburstMC.Protocol</groupId>
             <artifactId>bedrock-v448</artifactId>
-            <version>690a545d</version>
+            <version>6ce2f6e</version>
             <scope>compile</scope>
             <exclusions>
                 <exclusion>

programming_language: HTML
filename: UpstreamPacketHandler.java
change_type: ModificationType.MODIFY
diff: @@ -80,7 +80,7 @@ public class UpstreamPacketHandler extends LoggingPacketHandler {
         session.setBlockMappings(BlockRegistries.BLOCKS.forVersion(loginPacket.getProtocolVersion()));
         session.setItemMappings(Registries.ITEMS.forVersion(loginPacket.getProtocolVersion()));
 
-        LoginEncryptionUtils.encryptPlayerConnection(connector, session, loginPacket);
+        LoginEncryptionUtils.encryptPlayerConnection(session, loginPacket);
 
         PlayStatusPacket playStatus = new PlayStatusPacket();
         playStatus.setStatus(PlayStatusPacket.Status.LOGIN_SUCCESS);

programming_language: Java
filename: PacketTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -29,6 +29,6 @@ import org.geysermc.connector.network.session.GeyserSession;
 
 public abstract class PacketTranslator<T> {
 
-    public abstract void translate(T packet, GeyserSession session);
+    public abstract void translate(GeyserSession session, T packet);
 
 }

programming_language: Java
filename: PacketTranslatorRegistry.java
change_type: ModificationType.MODIFY
diff: @@ -112,7 +112,7 @@ public class PacketTranslatorRegistry<T> {
         }
 
         try {
-            translator.translate(packet, session);
+            translator.translate(session, packet);
         } catch (Throwable ex) {
             GeyserConnector.getInstance().getLogger().error(LanguageUtils.getLocaleStringLog("geyser.network.translator.packet.failed", packet.getClass().getSimpleName()), ex);
             ex.printStackTrace();

programming_language: Java
filename: BedrockAdventureSettingsTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -38,7 +38,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class BedrockAdventureSettingsTranslator extends PacketTranslator<AdventureSettingsPacket> {
 
     @Override
-    public void translate(AdventureSettingsPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, AdventureSettingsPacket packet) {
         boolean isFlying = packet.getSettings().contains(AdventureSetting.FLYING);
         if (!isFlying && session.getGameMode() == GameMode.SPECTATOR) {
             // We should always be flying in spectator mode

programming_language: Java
filename: BedrockAnimateTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -39,7 +39,7 @@ import java.util.concurrent.TimeUnit;
 public class BedrockAnimateTranslator extends PacketTranslator<AnimatePacket> {
 
     @Override
-    public void translate(AnimatePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, AnimatePacket packet) {
         // Stop the player sending animations before they have fully spawned into the server
         if (!session.isSpawned()) {
             return;

programming_language: Java
filename: BedrockBlockEntityDataTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -39,7 +39,7 @@ import org.geysermc.connector.utils.SignUtils;
 public class BedrockBlockEntityDataTranslator extends PacketTranslator<BlockEntityDataPacket> {
 
     @Override
-    public void translate(BlockEntityDataPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, BlockEntityDataPacket packet) {
         NbtMap tag = packet.getData();
         if (tag.getString("id").equals("Sign")) {
             // This is the reason why this all works - Bedrock sends packets every time you update the sign, Java only wants the final packet

programming_language: Java
filename: BedrockBlockPickRequestTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -40,7 +40,7 @@ import org.geysermc.connector.utils.InventoryUtils;
 public class BedrockBlockPickRequestTranslator extends PacketTranslator<BlockPickRequestPacket> {
 
     @Override
-    public void translate(BlockPickRequestPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, BlockPickRequestPacket packet) {
         Vector3i vector = packet.getBlockPosition();
         int blockToPick = session.getConnector().getWorldManager().getBlockAt(session, vector.getX(), vector.getY(), vector.getZ());
         

programming_language: Java
filename: BedrockBookEditTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -49,7 +49,7 @@ public class BedrockBookEditTranslator extends PacketTranslator<BookEditPacket>
     private static final int MAXIMUM_TITLE_LENGTH = 128 * 4;
 
     @Override
-    public void translate(BookEditPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, BookEditPacket packet) {
         if (packet.getText() != null && !packet.getText().isEmpty() && packet.getText().getBytes(StandardCharsets.UTF_8).length > MAXIMUM_PAGE_LENGTH) {
             session.getConnector().getLogger().warning("Page length greater than server allowed!");
             return;

programming_language: Java
filename: BedrockCommandBlockUpdateTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -38,7 +38,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class BedrockCommandBlockUpdateTranslator extends PacketTranslator<CommandBlockUpdatePacket> {
 
     @Override
-    public void translate(CommandBlockUpdatePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, CommandBlockUpdatePacket packet) {
         String command = packet.getCommand();
         boolean outputTracked = packet.isOutputTracked();
         if (packet.isBlock()) {

programming_language: Java
filename: BedrockCommandRequestTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -40,7 +40,7 @@ import org.geysermc.connector.network.translators.chat.MessageTranslator;
 public class BedrockCommandRequestTranslator extends PacketTranslator<CommandRequestPacket> {
 
     @Override
-    public void translate(CommandRequestPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, CommandRequestPacket packet) {
         String command = packet.getCommand().replace("/", "");
         CommandManager commandManager = GeyserConnector.getInstance().getCommandManager();
         if (session.getConnector().getPlatformType() == PlatformType.STANDALONE && command.trim().startsWith("geyser ") && commandManager.getCommands().containsKey(command.split(" ")[1])) {

programming_language: Java
filename: BedrockContainerCloseTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -38,7 +38,7 @@ import org.geysermc.connector.utils.InventoryUtils;
 public class BedrockContainerCloseTranslator extends PacketTranslator<ContainerClosePacket> {
 
     @Override
-    public void translate(ContainerClosePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ContainerClosePacket packet) {
         byte windowId = packet.getId();
 
         //Client wants close confirmation

programming_language: Java
filename: BedrockEmoteListTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class BedrockEmoteListTranslator extends PacketTranslator<EmoteListPacket> {
 
     @Override
-    public void translate(EmoteListPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, EmoteListPacket packet) {
         if (session.getConnector().getConfig().getEmoteOffhandWorkaround() == EmoteOffhandWorkaroundOption.NO_EMOTES) {
             return;
         }

programming_language: Java
filename: BedrockEntityPickRequestTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -42,7 +42,7 @@ import org.geysermc.connector.utils.InventoryUtils;
 public class BedrockEntityPickRequestTranslator extends PacketTranslator<EntityPickRequestPacket> {
 
     @Override
-    public void translate(EntityPickRequestPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, EntityPickRequestPacket packet) {
         if (session.getGameMode() != GameMode.CREATIVE) return; // Apparently Java behavior
         Entity entity = session.getEntityCache().getEntityByGeyserId(packet.getRuntimeEntityId());
         if (entity == null) return;

programming_language: Java
filename: BedrockFilterTextTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -41,7 +41,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class BedrockFilterTextTranslator extends PacketTranslator<FilterTextPacket> {
 
     @Override
-    public void translate(FilterTextPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, FilterTextPacket packet) {
         if (session.getOpenInventory() instanceof CartographyContainer) {
             // We don't want to be able to rename in the cartography table
             return;

programming_language: Java
filename: BedrockInventoryTransactionTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -70,7 +70,7 @@ public class BedrockInventoryTransactionTranslator extends PacketTranslator<Inve
     private static final float MAXIMUM_BLOCK_DESTROYING_DISTANCE = 36f;
 
     @Override
-    public void translate(InventoryTransactionPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, InventoryTransactionPacket packet) {
         // Send book updates before opening inventories
         session.getBookEditCache().checkForSend();
 

programming_language: Java
filename: BedrockItemFrameDropItemTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -44,7 +44,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class BedrockItemFrameDropItemTranslator extends PacketTranslator<ItemFrameDropItemPacket> {
 
     @Override
-    public void translate(ItemFrameDropItemPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ItemFrameDropItemPacket packet) {
         Entity entity = ItemFrameEntity.getItemFrameEntity(session, packet.getBlockPosition());
         if (entity != null) {
             ClientPlayerInteractEntityPacket interactPacket = new ClientPlayerInteractEntityPacket((int) entity.getEntityId(),

programming_language: Java
filename: BedrockItemStackRequestTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -39,7 +39,7 @@ import org.geysermc.connector.network.translators.inventory.InventoryTranslator;
 public class BedrockItemStackRequestTranslator extends PacketTranslator<ItemStackRequestPacket> {
 
     @Override
-    public void translate(ItemStackRequestPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ItemStackRequestPacket packet) {
         Inventory inventory = session.getOpenInventory();
         if (inventory == null)
             return;

programming_language: Java
filename: BedrockLecternUpdateTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -45,7 +45,7 @@ import org.geysermc.connector.utils.InventoryUtils;
 public class BedrockLecternUpdateTranslator extends PacketTranslator<LecternUpdatePacket> {
 
     @Override
-    public void translate(LecternUpdatePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, LecternUpdatePacket packet) {
         if (packet.isDroppingBook()) {
             // Bedrock drops the book outside of the GUI. Java drops it in the GUI
             // So, we enter the GUI and then drop it! :)

programming_language: Java
filename: BedrockMapInfoRequestTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -38,7 +38,7 @@ import java.util.concurrent.TimeUnit;
 public class BedrockMapInfoRequestTranslator extends PacketTranslator<MapInfoRequestPacket> {
 
     @Override
-    public void translate(MapInfoRequestPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, MapInfoRequestPacket packet) {
         long mapId = packet.getUniqueMapId();
 
         ClientboundMapItemDataPacket mapPacket = session.getStoredMaps().remove(mapId);

programming_language: Java
filename: BedrockMobEquipmentTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -42,7 +42,7 @@ import java.util.concurrent.TimeUnit;
 public class BedrockMobEquipmentTranslator extends PacketTranslator<MobEquipmentPacket> {
 
     @Override
-    public void translate(MobEquipmentPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, MobEquipmentPacket packet) {
         if (!session.isSpawned() || packet.getHotbarSlot() > 8 ||
                 packet.getContainerId() != ContainerId.INVENTORY || session.getPlayerInventory().getHeldItemSlot() == packet.getHotbarSlot()) {
             // For the last condition - Don't update the slot if the slot is the same - not Java Edition behavior and messes with plugins such as Grief Prevention

programming_language: Java
filename: BedrockMoveEntityAbsoluteTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -40,7 +40,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class BedrockMoveEntityAbsoluteTranslator extends PacketTranslator<MoveEntityAbsolutePacket> {
 
     @Override
-    public void translate(MoveEntityAbsolutePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, MoveEntityAbsolutePacket packet) {
         session.setLastVehicleMoveTimestamp(System.currentTimeMillis());
 
         float y = packet.getPosition().getY();

programming_language: Java
filename: BedrockNetworkStackLatencyTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -45,7 +45,7 @@ import java.util.concurrent.TimeUnit;
 public class BedrockNetworkStackLatencyTranslator extends PacketTranslator<NetworkStackLatencyPacket> {
 
     @Override
-    public void translate(NetworkStackLatencyPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, NetworkStackLatencyPacket packet) {
         long pingId;
         // so apparently, as of 1.16.200
         // PS4 divides the network stack latency timestamp FOR US!!!

programming_language: Java
filename: BedrockPacketViolationWarningTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -34,7 +34,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class BedrockPacketViolationWarningTranslator extends PacketTranslator<PacketViolationWarningPacket> {
 
     @Override
-    public void translate(PacketViolationWarningPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, PacketViolationWarningPacket packet) {
         // Not translated since this is something that the developers need to know
         session.getConnector().getLogger().error("Packet violation warning sent from client! " + packet.toString());
     }

programming_language: Java
filename: BedrockPlayerInputTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -46,7 +46,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class BedrockPlayerInputTranslator extends PacketTranslator<PlayerInputPacket> {
 
     @Override
-    public void translate(PlayerInputPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, PlayerInputPacket packet) {
         ClientSteerVehiclePacket clientSteerVehiclePacket = new ClientSteerVehiclePacket(
                 packet.getInputMotion().getX(), packet.getInputMotion().getY(), packet.isJumping(), packet.isSneaking()
         );

programming_language: Java
filename: BedrockPositionTrackingDBClientRequestTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -42,7 +42,7 @@ import org.geysermc.connector.utils.LoadstoneTracker;
 public class BedrockPositionTrackingDBClientRequestTranslator extends PacketTranslator<PositionTrackingDBClientRequestPacket> {
 
     @Override
-    public void translate(PositionTrackingDBClientRequestPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, PositionTrackingDBClientRequestPacket packet) {
         PositionTrackingDBServerBroadcastPacket broadcastPacket = new PositionTrackingDBServerBroadcastPacket();
         broadcastPacket.setTrackingId(packet.getTrackingId());
 

programming_language: Java
filename: BedrockRespawnTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -40,7 +40,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class BedrockRespawnTranslator extends PacketTranslator<RespawnPacket> {
 
     @Override
-    public void translate(RespawnPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, RespawnPacket packet) {
         if (packet.getState() == RespawnPacket.State.CLIENT_READY) {
             // Previously we only sent the respawn packet before the server finished loading
             // The message included was 'Otherwise when immediate respawn is on the client never loads'

programming_language: Java
filename: BedrockServerSettingsRequestTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -38,7 +38,7 @@ import java.util.concurrent.TimeUnit;
 @Translator(packet = ServerSettingsRequestPacket.class)
 public class BedrockServerSettingsRequestTranslator extends PacketTranslator<ServerSettingsRequestPacket> {
     @Override
-    public void translate(ServerSettingsRequestPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerSettingsRequestPacket packet) {
         CustomForm window = SettingsUtils.buildForm(session);
         int windowId = session.getFormCache().addForm(window);
 

programming_language: Java
filename: BedrockSetLocalPlayerAsInitializedTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -37,7 +37,7 @@ import org.geysermc.connector.skin.SkullSkinManager;
 @Translator(packet = SetLocalPlayerAsInitializedPacket.class)
 public class BedrockSetLocalPlayerAsInitializedTranslator extends PacketTranslator<SetLocalPlayerAsInitializedPacket> {
     @Override
-    public void translate(SetLocalPlayerAsInitializedPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, SetLocalPlayerAsInitializedPacket packet) {
         if (session.getPlayerEntity().getGeyserId() == packet.getRuntimeEntityId()) {
             if (!session.getUpstream().isInitialized()) {
                 session.getUpstream().setInitialized(true);

programming_language: Java
filename: BedrockShowCreditsTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -37,7 +37,7 @@ import com.nukkitx.protocol.bedrock.packet.ShowCreditsPacket;
 public class BedrockShowCreditsTranslator extends PacketTranslator<ShowCreditsPacket> {
 
     @Override
-    public void translate(ShowCreditsPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ShowCreditsPacket packet) {
         if (packet.getStatus() == ShowCreditsPacket.Status.END_CREDITS) {
             ClientRequestPacket javaRespawnPacket = new ClientRequestPacket(ClientRequest.RESPAWN);
             session.sendDownstreamPacket(javaRespawnPacket);

programming_language: Java
filename: BedrockTextTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -37,7 +37,7 @@ import org.geysermc.connector.network.translators.chat.MessageTranslator;
 public class BedrockTextTranslator extends PacketTranslator<TextPacket> {
 
     @Override
-    public void translate(TextPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, TextPacket packet) {
         String message = packet.getMessage();
 
         if (MessageTranslator.isTooLong(message, session)) {

programming_language: Java
filename: BedrockEntityEventTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -43,7 +43,7 @@ import java.util.concurrent.TimeUnit;
 public class BedrockEntityEventTranslator extends PacketTranslator<EntityEventPacket> {
 
     @Override
-    public void translate(EntityEventPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, EntityEventPacket packet) {
         switch (packet.getType()) {
             case EATING_ITEM:
                 // Resend the packet so we get the eating sounds

programming_language: Java
filename: BedrockActionTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -54,7 +54,7 @@ import java.util.ArrayList;
 public class BedrockActionTranslator extends PacketTranslator<PlayerActionPacket> {
 
     @Override
-    public void translate(PlayerActionPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, PlayerActionPacket packet) {
         SessionPlayerEntity entity = session.getPlayerEntity();
 
         // Send book update before any player action

programming_language: Java
filename: BedrockEmoteTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -40,7 +40,7 @@ import org.geysermc.connector.utils.BlockUtils;
 public class BedrockEmoteTranslator extends PacketTranslator<EmotePacket> {
 
     @Override
-    public void translate(EmotePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, EmotePacket packet) {
         if (session.getConnector().getConfig().getEmoteOffhandWorkaround() != EmoteOffhandWorkaroundOption.DISABLED) {
             // Activate the workaround - we should trigger the offhand now
             ClientPlayerActionPacket swapHandsPacket = new ClientPlayerActionPacket(PlayerAction.SWAP_HANDS, BlockUtils.POSITION_ZERO,

programming_language: Java
filename: BedrockInteractTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -46,7 +46,7 @@ import org.geysermc.connector.utils.InteractiveTagManager;
 public class BedrockInteractTranslator extends PacketTranslator<InteractPacket> {
 
     @Override
-    public void translate(InteractPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, InteractPacket packet) {
         Entity entity;
         if (packet.getRuntimeEntityId() == session.getPlayerEntity().getGeyserId()) {
             //Player is not in entity cache

programming_language: Java
filename: BedrockMovePlayerTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -53,7 +53,7 @@ public class BedrockMovePlayerTranslator extends PacketTranslator<MovePlayerPack
     }
 
     @Override
-    public void translate(MovePlayerPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, MovePlayerPacket packet) {
         SessionPlayerEntity entity = session.getPlayerEntity();
         if (!session.isSpawned()) return;
 

programming_language: Java
filename: BedrockRiderJumpTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -37,7 +37,7 @@ import org.geysermc.connector.network.translators.Translator;
 @Translator(packet = RiderJumpPacket.class)
 public class BedrockRiderJumpTranslator extends PacketTranslator<RiderJumpPacket> {
     @Override
-    public void translate(RiderJumpPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, RiderJumpPacket packet) {
         Entity vehicle = session.getRidingVehicleEntity();
         if (vehicle instanceof AbstractHorseEntity) {
             ClientPlayerStatePacket playerStatePacket = new ClientPlayerStatePacket((int) vehicle.getEntityId(),  PlayerState.START_HORSE_JUMP, packet.getJumpStrength());

programming_language: Java
filename: BedrockSetPlayerGameTypeTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -38,7 +38,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class BedrockSetPlayerGameTypeTranslator extends PacketTranslator<SetPlayerGameTypePacket> {
 
     @Override
-    public void translate(SetPlayerGameTypePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, SetPlayerGameTypePacket packet) {
         // no
         SetPlayerGameTypePacket playerGameTypePacket = new SetPlayerGameTypePacket();
         playerGameTypePacket.setGamemode(session.getGameMode().ordinal());

programming_language: Java
filename: BedrockLevelSoundEventTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -36,7 +36,7 @@ import org.geysermc.connector.utils.CooldownUtils;
 public class BedrockLevelSoundEventTranslator extends PacketTranslator<LevelSoundEventPacket> {
 
     @Override
-    public void translate(LevelSoundEventPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, LevelSoundEventPacket packet) {
         // lol what even :thinking:
         session.sendUpstreamPacket(packet);
 

programming_language: Scala
filename: JavaAdvancementsTabTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -37,7 +37,7 @@ import org.geysermc.connector.network.translators.Translator;
 @Translator(packet = ServerAdvancementTabPacket.class)
 public class JavaAdvancementsTabTranslator extends PacketTranslator<ServerAdvancementTabPacket> {
     @Override
-    public void translate(ServerAdvancementTabPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerAdvancementTabPacket packet) {
         AdvancementsCache advancementsCache = session.getAdvancementsCache();
         advancementsCache.setCurrentAdvancementCategoryId(packet.getTabId());
         advancementsCache.buildAndShowListForm();

programming_language: Java
filename: JavaAdvancementsTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -42,7 +42,7 @@ import java.util.Map;
 public class JavaAdvancementsTranslator extends PacketTranslator<ServerAdvancementsPacket> {
 
     @Override
-    public void translate(ServerAdvancementsPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerAdvancementsPacket packet) {
         AdvancementsCache advancementsCache = session.getAdvancementsCache();
         if (packet.isReset()) {
             advancementsCache.getStoredAdvancements().clear();

programming_language: Java
filename: JavaBossBarTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.server.ServerBossBarPacke
 @Translator(packet = ServerBossBarPacket.class)
 public class JavaBossBarTranslator extends PacketTranslator<ServerBossBarPacket> {
     @Override
-    public void translate(ServerBossBarPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerBossBarPacket packet) {
         BossBar bossBar = session.getEntityCache().getBossBar(packet.getUuid());
         switch (packet.getAction()) {
             case ADD:

programming_language: Java
filename: JavaChatTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -36,7 +36,7 @@ import org.geysermc.connector.network.translators.chat.MessageTranslator;
 public class JavaChatTranslator extends PacketTranslator<ServerChatPacket> {
 
     @Override
-    public void translate(ServerChatPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerChatPacket packet) {
         TextPacket textPacket = new TextPacket();
         textPacket.setPlatformChatId("");
         textPacket.setSourceName("");

programming_language: Java
filename: JavaDeclareCommandsTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -96,7 +96,7 @@ public class JavaDeclareCommandsTranslator extends PacketTranslator<ServerDeclar
     }
 
     @Override
-    public void translate(ServerDeclareCommandsPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerDeclareCommandsPacket packet) {
         // Don't send command suggestions if they are disabled
         if (!session.getConnector().getConfig().isCommandSuggestions()) {
             session.getConnector().getLogger().debug("Not sending translated command suggestions as they are disabled.");

programming_language: Java
filename: JavaDeclareRecipesTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -71,7 +71,7 @@ public class JavaDeclareRecipesTranslator extends PacketTranslator<ServerDeclare
     );
 
     @Override
-    public void translate(ServerDeclareRecipesPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerDeclareRecipesPacket packet) {
         Map<RecipeType, List<CraftingData>> recipeTypes = Registries.CRAFTING_DATA.forVersion(session.getUpstream().getProtocolVersion());
         // Get the last known network ID (first used for the pregenerated recipes) and increment from there.
         int netId = InventoryUtils.LAST_RECIPE_NET_ID + 1;

programming_language: Java
filename: JavaDeclareTagsTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -34,7 +34,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class JavaDeclareTagsTranslator extends PacketTranslator<ServerDeclareTagsPacket> {
 
     @Override
-    public void translate(ServerDeclareTagsPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerDeclareTagsPacket packet) {
         session.getTagCache().loadPacket(packet);
     }
 }

programming_language: Java
filename: JavaDifficultyTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -36,7 +36,7 @@ import com.nukkitx.protocol.bedrock.packet.SetDifficultyPacket;
 public class JavaDifficultyTranslator extends PacketTranslator<ServerDifficultyPacket> {
 
     @Override
-    public void translate(ServerDifficultyPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerDifficultyPacket packet) {
         SetDifficultyPacket setDifficultyPacket = new SetDifficultyPacket();
         setDifficultyPacket.setDifficulty(packet.getDifficulty().ordinal());
         session.sendUpstreamPacket(setDifficultyPacket);

programming_language: Java
filename: JavaDisconnectPacket.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ import org.geysermc.connector.network.translators.chat.MessageTranslator;
 public class JavaDisconnectPacket extends PacketTranslator<ServerDisconnectPacket> {
 
     @Override
-    public void translate(ServerDisconnectPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerDisconnectPacket packet) {
         session.disconnect(MessageTranslator.convertMessage(packet.getReason(), session.getLocale()));
     }
 }

programming_language: Java
filename: JavaJoinGameTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -52,7 +52,7 @@ public class JavaJoinGameTranslator extends PacketTranslator<ServerJoinGamePacke
     private static final List<SkinPart> SKIN_PART_VALUES = Arrays.asList(SkinPart.values());
 
     @Override
-    public void translate(ServerJoinGamePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerJoinGamePacket packet) {
         PlayerEntity entity = session.getPlayerEntity();
         entity.setEntityId(packet.getEntityId());
 

programming_language: Java
filename: JavaKeepAliveTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -38,7 +38,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class JavaKeepAliveTranslator extends PacketTranslator<ServerKeepAlivePacket> {
 
     @Override
-    public void translate(ServerKeepAlivePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerKeepAlivePacket packet) {
         if (!session.getConnector().getConfig().isForwardPlayerPing()) {
             return;
         }

programming_language: Java
filename: JavaLoginDisconnectTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ import org.geysermc.connector.network.translators.chat.MessageTranslator;
 public class JavaLoginDisconnectTranslator extends PacketTranslator<LoginDisconnectPacket> {
 
     @Override
-    public void translate(LoginDisconnectPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, LoginDisconnectPacket packet) {
         // The client doesn't manually get disconnected so we have to do it ourselves
         session.disconnect(MessageTranslator.convertMessage(packet.getReason(), session.getLocale()));
     }

programming_language: Java
filename: JavaLoginPluginRequestTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ import com.github.steveice10.mc.protocol.packet.login.server.LoginPluginRequestP
 @Translator(packet = LoginPluginRequestPacket.class)
 public class JavaLoginPluginRequestTranslator extends PacketTranslator<LoginPluginRequestPacket> {
     @Override
-    public void translate(LoginPluginRequestPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, LoginPluginRequestPacket packet) {
         // A vanilla client doesn't know any PluginMessage in the Login state, so we don't know any either.
         // Note: Fabric Networking API v1 will not let the client log in without sending this
         session.sendDownstreamPacket(

programming_language: Java
filename: JavaLoginSuccessTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -38,7 +38,7 @@ import org.geysermc.connector.skin.SkinManager;
 public class JavaLoginSuccessTranslator extends PacketTranslator<LoginSuccessPacket> {
 
     @Override
-    public void translate(LoginSuccessPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, LoginSuccessPacket packet) {
         PlayerEntity playerEntity = session.getPlayerEntity();
         AuthType remoteAuthType = session.getRemoteAuthType();
 

programming_language: Java
filename: JavaPingPacket.java
change_type: ModificationType.MODIFY
diff: @@ -36,7 +36,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class JavaPingPacket extends PacketTranslator<ServerPingPacket> {
 
     @Override
-    public void translate(ServerPingPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerPingPacket packet) {
         session.sendDownstreamPacket(new ClientPongPacket(packet.getId()));
     }
 }

programming_language: Java
filename: JavaPluginMessageTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -41,7 +41,7 @@ import java.nio.charset.StandardCharsets;
 @Translator(packet = ServerPluginMessagePacket.class)
 public class JavaPluginMessageTranslator extends PacketTranslator<ServerPluginMessagePacket> {
     @Override
-    public void translate(ServerPluginMessagePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerPluginMessagePacket packet) {
         // The only plugin messages it has to listen for are Floodgate plugin messages
         if (session.getRemoteAuthType() != AuthType.FLOODGATE) {
             return;

programming_language: Java
filename: JavaRespawnTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -43,7 +43,7 @@ import org.geysermc.connector.utils.DimensionUtils;
 public class JavaRespawnTranslator extends PacketTranslator<ServerRespawnPacket> {
 
     @Override
-    public void translate(ServerRespawnPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerRespawnPacket packet) {
         SessionPlayerEntity entity = session.getPlayerEntity();
 
         entity.setHealth(entity.getMaxHealth());

programming_language: Java
filename: JavaStatisticsTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ import org.geysermc.connector.utils.StatisticsUtils;
 public class JavaStatisticsTranslator extends PacketTranslator<ServerStatisticsPacket> {
 
     @Override
-    public void translate(ServerStatisticsPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerStatisticsPacket packet) {
         session.updateStatistics(packet.getStatistics());
 
         if (session.isWaitingForStatistics()) {

programming_language: Java
filename: JavaUnlockRecipesTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -40,7 +40,7 @@ import java.util.Arrays;
 public class JavaUnlockRecipesTranslator extends PacketTranslator<ServerUnlockRecipesPacket> {
 
     @Override
-    public void translate(ServerUnlockRecipesPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerUnlockRecipesPacket packet) {
         if (packet.getAction() == UnlockRecipesAction.REMOVE) {
             session.getUnlockedRecipes().removeAll(Arrays.asList(packet.getRecipes()));
         } else {

programming_language: Java
filename: JavaEntityAnimationTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -40,7 +40,7 @@ import org.geysermc.connector.utils.DimensionUtils;
 public class JavaEntityAnimationTranslator extends PacketTranslator<ServerEntityAnimationPacket> {
 
     @Override
-    public void translate(ServerEntityAnimationPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerEntityAnimationPacket packet) {
         Entity entity;
         if (packet.getEntityId() == session.getPlayerEntity().getEntityId()) {
             entity = session.getPlayerEntity();

programming_language: Java
filename: JavaEntityAttachTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -42,7 +42,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class JavaEntityAttachTranslator extends PacketTranslator<ServerEntityAttachPacket> {
 
     @Override
-    public void translate(ServerEntityAttachPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerEntityAttachPacket packet) {
 
         Entity holderId;
         if (packet.getEntityId() == session.getPlayerEntity().getEntityId()) {

programming_language: Java
filename: JavaEntityCollectItemTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -44,7 +44,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class JavaEntityCollectItemTranslator extends PacketTranslator<ServerEntityCollectItemPacket> {
 
     @Override
-    public void translate(ServerEntityCollectItemPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerEntityCollectItemPacket packet) {
         // Collected entity is the other entity
         Entity collectedEntity = session.getEntityCache().getEntityByJavaId(packet.getCollectedEntityId());
         if (collectedEntity == null) return;

programming_language: Java
filename: JavaEntityEffectTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -37,7 +37,7 @@ import org.geysermc.connector.utils.EntityUtils;
 public class JavaEntityEffectTranslator extends PacketTranslator<ServerEntityEffectPacket> {
 
     @Override
-    public void translate(ServerEntityEffectPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerEntityEffectPacket packet) {
         Entity entity;
         if (packet.getEntityId() == session.getPlayerEntity().getEntityId()) {
             entity = session.getPlayerEntity();

programming_language: Java
filename: JavaEntityEquipmentTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -39,7 +39,7 @@ import org.geysermc.connector.network.translators.item.ItemTranslator;
 public class JavaEntityEquipmentTranslator extends PacketTranslator<ServerEntityEquipmentPacket> {
 
     @Override
-    public void translate(ServerEntityEquipmentPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerEntityEquipmentPacket packet) {
         Entity entity;
         if (packet.getEntityId() == session.getPlayerEntity().getEntityId()) {
             entity = session.getPlayerEntity();

programming_language: Java
filename: JavaEntityHeadLookTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class JavaEntityHeadLookTranslator extends PacketTranslator<ServerEntityHeadLookPacket> {
 
     @Override
-    public void translate(ServerEntityHeadLookPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerEntityHeadLookPacket packet) {
         Entity entity = session.getEntityCache().getEntityByJavaId(packet.getEntityId());
         if (packet.getEntityId() == session.getPlayerEntity().getEntityId()) {
             entity = session.getPlayerEntity();

programming_language: Java
filename: JavaEntityMetadataTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -39,7 +39,7 @@ import org.geysermc.connector.utils.LanguageUtils;
 public class JavaEntityMetadataTranslator extends PacketTranslator<ServerEntityMetadataPacket> {
 
     @Override
-    public void translate(ServerEntityMetadataPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerEntityMetadataPacket packet) {
         Entity entity;
         if (packet.getEntityId() == session.getPlayerEntity().getEntityId()) {
             entity = session.getPlayerEntity();

programming_language: Java
filename: JavaEntityPositionRotationTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class JavaEntityPositionRotationTranslator extends PacketTranslator<ServerEntityPositionRotationPacket> {
 
     @Override
-    public void translate(ServerEntityPositionRotationPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerEntityPositionRotationPacket packet) {
         Entity entity = session.getEntityCache().getEntityByJavaId(packet.getEntityId());
         if (packet.getEntityId() == session.getPlayerEntity().getEntityId()) {
             entity = session.getPlayerEntity();

programming_language: Java
filename: JavaEntityPositionTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class JavaEntityPositionTranslator extends PacketTranslator<ServerEntityPositionPacket> {
 
     @Override
-    public void translate(ServerEntityPositionPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerEntityPositionPacket packet) {
         Entity entity = session.getEntityCache().getEntityByJavaId(packet.getEntityId());
         if (packet.getEntityId() == session.getPlayerEntity().getEntityId()) {
             entity = session.getPlayerEntity();

programming_language: Java
filename: JavaEntityPropertiesTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -36,7 +36,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class JavaEntityPropertiesTranslator extends PacketTranslator<ServerEntityPropertiesPacket> {
 
     @Override
-    public void translate(ServerEntityPropertiesPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerEntityPropertiesPacket packet) {
         Entity entity;
         if (packet.getEntityId() == session.getPlayerEntity().getEntityId()) {
             entity = session.getPlayerEntity();

programming_language: Java
filename: JavaEntityRemoveEffectTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -37,7 +37,7 @@ import org.geysermc.connector.utils.EntityUtils;
 public class JavaEntityRemoveEffectTranslator extends PacketTranslator<ServerEntityRemoveEffectPacket> {
 
     @Override
-    public void translate(ServerEntityRemoveEffectPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerEntityRemoveEffectPacket packet) {
         Entity entity;
         if (packet.getEntityId() == session.getPlayerEntity().getEntityId()) {
             entity = session.getPlayerEntity();

programming_language: Java
filename: JavaEntityRotationTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class JavaEntityRotationTranslator extends PacketTranslator<ServerEntityRotationPacket> {
 
     @Override
-    public void translate(ServerEntityRotationPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerEntityRotationPacket packet) {
         Entity entity = session.getEntityCache().getEntityByJavaId(packet.getEntityId());
         if (packet.getEntityId() == session.getPlayerEntity().getEntityId()) {
             entity = session.getPlayerEntity();

programming_language: Java
filename: JavaEntitySetPassengersTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -43,7 +43,7 @@ import java.util.Arrays;
 public class JavaEntitySetPassengersTranslator extends PacketTranslator<ServerEntitySetPassengersPacket> {
 
     @Override
-    public void translate(ServerEntitySetPassengersPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerEntitySetPassengersPacket packet) {
         Entity entity;
         if (packet.getEntityId() == session.getPlayerEntity().getEntityId()) {
             entity = session.getPlayerEntity();

programming_language: Java
filename: JavaEntityStatusTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -43,7 +43,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class JavaEntityStatusTranslator extends PacketTranslator<ServerEntityStatusPacket> {
 
     @Override
-    public void translate(ServerEntityStatusPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerEntityStatusPacket packet) {
         Entity entity;
         if (packet.getEntityId() == session.getPlayerEntity().getEntityId()) {
             entity = session.getPlayerEntity();

programming_language: Java
filename: JavaEntityTeleportTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -37,7 +37,7 @@ import com.nukkitx.math.vector.Vector3f;
 public class JavaEntityTeleportTranslator extends PacketTranslator<ServerEntityTeleportPacket> {
 
     @Override
-    public void translate(ServerEntityTeleportPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerEntityTeleportPacket packet) {
         Entity entity = session.getEntityCache().getEntityByJavaId(packet.getEntityId());
         if (packet.getEntityId() == session.getPlayerEntity().getEntityId()) {
             entity = session.getPlayerEntity();

programming_language: Java
filename: JavaEntityVelocityTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -40,7 +40,7 @@ import com.nukkitx.protocol.bedrock.packet.SetEntityMotionPacket;
 public class JavaEntityVelocityTranslator extends PacketTranslator<ServerEntityVelocityPacket> {
 
     @Override
-    public void translate(ServerEntityVelocityPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerEntityVelocityPacket packet) {
         Entity entity = session.getEntityCache().getEntityByJavaId(packet.getEntityId());
         if (packet.getEntityId() == session.getPlayerEntity().getEntityId()) {
             entity = session.getPlayerEntity();

programming_language: Java
filename: JavaRemoveEntitiesTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class JavaRemoveEntitiesTranslator extends PacketTranslator<ServerRemoveEntitiesPacket> {
 
     @Override
-    public void translate(ServerRemoveEntitiesPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerRemoveEntitiesPacket packet) {
         for (int entityId : packet.getEntityIds()) {
             Entity entity = session.getEntityCache().getEntityByJavaId(entityId);
             if (entity != null) {

programming_language: Java
filename: JavaPlayerAbilitiesTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -34,7 +34,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class JavaPlayerAbilitiesTranslator extends PacketTranslator<ServerPlayerAbilitiesPacket> {
 
     @Override
-    public void translate(ServerPlayerAbilitiesPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerPlayerAbilitiesPacket packet) {
         session.setCanFly(packet.isCanFly());
         session.setFlying(packet.isFlying());
         session.sendAdventureSettings();

programming_language: Java
filename: JavaPlayerActionAckTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -40,7 +40,7 @@ import org.geysermc.connector.utils.ChunkUtils;
 public class JavaPlayerActionAckTranslator extends PacketTranslator<ServerPlayerActionAckPacket> {
 
     @Override
-    public void translate(ServerPlayerActionAckPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerPlayerActionAckPacket packet) {
         ChunkUtils.updateBlock(session, packet.getNewState(), packet.getPosition());
         if (packet.getAction() == PlayerAction.START_DIGGING && !packet.isSuccessful()) {
             LevelEventPacket stopBreak = new LevelEventPacket();

programming_language: Java
filename: JavaPlayerChangeHeldItemTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class JavaPlayerChangeHeldItemTranslator extends PacketTranslator<ServerPlayerChangeHeldItemPacket> {
 
     @Override
-    public void translate(ServerPlayerChangeHeldItemPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerPlayerChangeHeldItemPacket packet) {
         PlayerHotbarPacket hotbarPacket = new PlayerHotbarPacket();
         hotbarPacket.setContainerId(0);
         hotbarPacket.setSelectedHotbarSlot(packet.getSlot());

programming_language: Java
filename: JavaPlayerHealthTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -41,7 +41,7 @@ import java.util.List;
 public class JavaPlayerHealthTranslator extends PacketTranslator<ServerPlayerHealthPacket> {
 
     @Override
-    public void translate(ServerPlayerHealthPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerPlayerHealthPacket packet) {
         SessionPlayerEntity entity = session.getPlayerEntity();
 
         int health = (int) Math.ceil(packet.getHealth());

programming_language: Java
filename: JavaPlayerListEntryTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -40,7 +40,7 @@ import org.geysermc.connector.skin.SkinManager;
 @Translator(packet = ServerPlayerListEntryPacket.class)
 public class JavaPlayerListEntryTranslator extends PacketTranslator<ServerPlayerListEntryPacket> {
     @Override
-    public void translate(ServerPlayerListEntryPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerPlayerListEntryPacket packet) {
         if (packet.getAction() != PlayerListEntryAction.ADD_PLAYER && packet.getAction() != PlayerListEntryAction.REMOVE_PLAYER)
             return;
 

programming_language: Java
filename: JavaPlayerPositionRotationTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -50,7 +50,7 @@ import org.geysermc.connector.utils.LanguageUtils;
 public class JavaPlayerPositionRotationTranslator extends PacketTranslator<ServerPlayerPositionRotationPacket> {
 
     @Override
-    public void translate(ServerPlayerPositionRotationPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerPlayerPositionRotationPacket packet) {
         if (!session.isLoggedIn())
             return;
 

programming_language: Java
filename: JavaPlayerSetExperienceTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -40,7 +40,7 @@ import java.util.Arrays;
 public class JavaPlayerSetExperienceTranslator extends PacketTranslator<ServerPlayerSetExperiencePacket> {
 
     @Override
-    public void translate(ServerPlayerSetExperiencePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerPlayerSetExperiencePacket packet) {
         SessionPlayerEntity entity = session.getPlayerEntity();
 
         AttributeData experience = GeyserAttributeType.EXPERIENCE.getAttribute(packet.getExperience());

programming_language: Java
filename: JavaSpawnEntityTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -46,7 +46,7 @@ import java.lang.reflect.InvocationTargetException;
 public class JavaSpawnEntityTranslator extends PacketTranslator<ServerSpawnEntityPacket> {
 
     @Override
-    public void translate(ServerSpawnEntityPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerSpawnEntityPacket packet) {
 
         Vector3f position = Vector3f.from(packet.getX(), packet.getY(), packet.getZ());
         Vector3f motion = Vector3f.from(packet.getMotionX(), packet.getMotionY(), packet.getMotionZ());

programming_language: Java
filename: JavaSpawnExpOrbTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -39,7 +39,7 @@ import com.nukkitx.math.vector.Vector3f;
 public class JavaSpawnExpOrbTranslator extends PacketTranslator<ServerSpawnExpOrbPacket> {
 
     @Override
-    public void translate(ServerSpawnExpOrbPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerSpawnExpOrbPacket packet) {
         Vector3f position = Vector3f.from(packet.getX(), packet.getY(), packet.getZ());
 
         Entity entity = new ExpOrbEntity(

programming_language: Java
filename: JavaSpawnLivingEntityTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -42,7 +42,7 @@ import java.lang.reflect.InvocationTargetException;
 public class JavaSpawnLivingEntityTranslator extends PacketTranslator<ServerSpawnLivingEntityPacket> {
 
     @Override
-    public void translate(ServerSpawnLivingEntityPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerSpawnLivingEntityPacket packet) {
         Vector3f position = Vector3f.from(packet.getX(), packet.getY(), packet.getZ());
         Vector3f motion = Vector3f.from(packet.getMotionX(), packet.getMotionY(), packet.getMotionZ());
         Vector3f rotation = Vector3f.from(packet.getYaw(), packet.getPitch(), packet.getHeadYaw());

programming_language: Java
filename: JavaSpawnPaintingTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -37,7 +37,7 @@ import org.geysermc.connector.utils.PaintingType;
 public class JavaSpawnPaintingTranslator extends PacketTranslator<ServerSpawnPaintingPacket> {
 
     @Override
-    public void translate(ServerSpawnPaintingPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerSpawnPaintingPacket packet) {
         Vector3f position = Vector3f.from(packet.getPosition().getX(), packet.getPosition().getY(), packet.getPosition().getZ());
 
         PaintingEntity entity = new PaintingEntity(packet.getEntityId(),

programming_language: Java
filename: JavaSpawnPlayerTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -39,7 +39,7 @@ import org.geysermc.connector.skin.SkinManager;
 public class JavaSpawnPlayerTranslator extends PacketTranslator<ServerSpawnPlayerPacket> {
 
     @Override
-    public void translate(ServerSpawnPlayerPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerSpawnPlayerPacket packet) {
         Vector3f position = Vector3f.from(packet.getX(), packet.getY(), packet.getZ());
         Vector3f rotation = Vector3f.from(packet.getYaw(), packet.getPitch(), packet.getYaw());
 

programming_language: Java
filename: JavaDisplayScoreboardTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.server.scoreboard.ServerD
 public class JavaDisplayScoreboardTranslator extends PacketTranslator<ServerDisplayScoreboardPacket> {
 
     @Override
-    public void translate(ServerDisplayScoreboardPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerDisplayScoreboardPacket packet) {
         session.getWorldCache().getScoreboard()
                 .displayObjective(packet.getName(), packet.getPosition());
     }

programming_language: Java
filename: JavaScoreboardObjectiveTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -41,7 +41,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.server.scoreboard.ServerS
 public class JavaScoreboardObjectiveTranslator extends PacketTranslator<ServerScoreboardObjectivePacket> {
 
     @Override
-    public void translate(ServerScoreboardObjectivePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerScoreboardObjectivePacket packet) {
         WorldCache worldCache = session.getWorldCache();
         Scoreboard scoreboard = worldCache.getScoreboard();
         Objective objective = scoreboard.getObjective(packet.getName());

programming_language: Java
filename: JavaTeamTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -47,7 +47,7 @@ public class JavaTeamTranslator extends PacketTranslator<ServerTeamPacket> {
     private static final GeyserLogger LOGGER = GeyserConnector.getInstance().getLogger();
 
     @Override
-    public void translate(ServerTeamPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerTeamPacket packet) {
         if (LOGGER.isDebug()) {
             LOGGER.debug("Team packet " + packet.getTeamName() + " " + packet.getAction() + " " + Arrays.toString(packet.getPlayers()));
         }

programming_language: Java
filename: JavaUpdateScoreTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -47,7 +47,7 @@ public class JavaUpdateScoreTranslator extends PacketTranslator<ServerUpdateScor
     }
 
     @Override
-    public void translate(ServerUpdateScorePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerUpdateScorePacket packet) {
         WorldCache worldCache = session.getWorldCache();
         Scoreboard scoreboard = worldCache.getScoreboard();
         int pps = worldCache.increaseAndGetScoreboardPacketsPerSecond();

programming_language: Java
filename: JavaClearTitlesTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class JavaClearTitlesTranslator extends PacketTranslator<ServerClearTitlesPacket> {
 
     @Override
-    public void translate(ServerClearTitlesPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerClearTitlesPacket packet) {
         SetTitlePacket titlePacket = new SetTitlePacket();
         // TODO handle packet.isResetTimes()
         titlePacket.setType(SetTitlePacket.Type.CLEAR);

programming_language: Java
filename: JavaSetActionBarTextTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -36,7 +36,7 @@ import org.geysermc.connector.network.translators.chat.MessageTranslator;
 public class JavaSetActionBarTextTranslator extends PacketTranslator<ServerSetActionBarTextPacket> {
 
     @Override
-    public void translate(ServerSetActionBarTextPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerSetActionBarTextPacket packet) {
         String text;
         if (packet.getText() == null) { //TODO 1.17 can this happen?
             text = " ";

programming_language: Java
filename: JavaSetSubtitleTextTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -36,7 +36,7 @@ import org.geysermc.connector.network.translators.chat.MessageTranslator;
 public class JavaSetSubtitleTextTranslator extends PacketTranslator<ServerSetSubtitleTextPacket> {
 
     @Override
-    public void translate(ServerSetSubtitleTextPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerSetSubtitleTextPacket packet) {
         String text;
         if (packet.getText() == null) { //TODO 1.17 can this happen?
             text = " ";

programming_language: Java
filename: JavaSetTitleTextTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -36,7 +36,7 @@ import org.geysermc.connector.network.translators.chat.MessageTranslator;
 public class JavaSetTitleTextTranslator extends PacketTranslator<ServerSetTitleTextPacket> {
 
     @Override
-    public void translate(ServerSetTitleTextPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerSetTitleTextPacket packet) {
         String text;
         if (packet.getText() == null) { //TODO 1.17 can this happen?
             text = " ";

programming_language: Java
filename: JavaSetTitlesAnimationTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class JavaSetTitlesAnimationTranslator extends PacketTranslator<ServerSetTitlesAnimationPacket> {
 
     @Override
-    public void translate(ServerSetTitlesAnimationPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerSetTitlesAnimationPacket packet) {
         SetTitlePacket titlePacket = new SetTitlePacket();
         titlePacket.setType(SetTitlePacket.Type.TIMES);
         titlePacket.setText("");

programming_language: Java
filename: JavaCloseWindowTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ import org.geysermc.connector.utils.InventoryUtils;
 public class JavaCloseWindowTranslator extends PacketTranslator<ServerCloseWindowPacket> {
 
     @Override
-    public void translate(ServerCloseWindowPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerCloseWindowPacket packet) {
         // Sometimes the server can request a window close of ID 0... when the window isn't even open
         // Don't confirm in this instance
         InventoryUtils.closeInventory(session, packet.getWindowId(), (session.getOpenInventory() != null && session.getOpenInventory().getId() == packet.getWindowId()));

programming_language: Java
filename: JavaOpenHorseWindowTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -98,7 +98,7 @@ public class JavaOpenHorseWindowTranslator extends PacketTranslator<ServerOpenHo
     }
 
     @Override
-    public void translate(ServerOpenHorseWindowPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerOpenHorseWindowPacket packet) {
         Entity entity = session.getEntityCache().getEntityByJavaId(packet.getEntityId());
         if (entity == null) {
             return;

programming_language: Java
filename: JavaOpenWindowTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -40,7 +40,7 @@ import org.geysermc.connector.utils.LocaleUtils;
 public class JavaOpenWindowTranslator extends PacketTranslator<ServerOpenWindowPacket> {
 
     @Override
-    public void translate(ServerOpenWindowPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerOpenWindowPacket packet) {
         if (packet.getWindowId() == 0) {
             return;
         }

programming_language: Java
filename: JavaSetSlotTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -58,7 +58,7 @@ import java.util.concurrent.TimeUnit;
 public class JavaSetSlotTranslator extends PacketTranslator<ServerSetSlotPacket> {
 
     @Override
-    public void translate(ServerSetSlotPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerSetSlotPacket packet) {
         if (packet.getWindowId() == 255) { //cursor
             GeyserItemStack newItem = GeyserItemStack.from(packet.getItem());
             session.getPlayerInventory().setCursor(newItem, session);

programming_language: Java
filename: JavaWindowItemsTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -38,7 +38,7 @@ import org.geysermc.connector.utils.InventoryUtils;
 public class JavaWindowItemsTranslator extends PacketTranslator<ServerWindowItemsPacket> {
 
     @Override
-    public void translate(ServerWindowItemsPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerWindowItemsPacket packet) {
         Inventory inventory = InventoryUtils.getInventory(session, packet.getWindowId());
         if (inventory == null)
             return;

programming_language: Java
filename: JavaWindowPropertyTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -37,7 +37,7 @@ import org.geysermc.connector.utils.InventoryUtils;
 public class JavaWindowPropertyTranslator extends PacketTranslator<ServerWindowPropertyPacket> {
 
     @Override
-    public void translate(ServerWindowPropertyPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerWindowPropertyPacket packet) {
         Inventory inventory = InventoryUtils.getInventory(session, packet.getWindowId());
         if (inventory == null)
             return;

programming_language: Java
filename: JavaBlockBreakAnimTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -41,7 +41,7 @@ import org.geysermc.connector.utils.BlockUtils;
 public class JavaBlockBreakAnimTranslator extends PacketTranslator<ServerBlockBreakAnimPacket> {
 
     @Override
-    public void translate(ServerBlockBreakAnimPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerBlockBreakAnimPacket packet) {
         int state = session.getConnector().getWorldManager().getBlockAt(session, packet.getPosition().getX(), packet.getPosition().getY(), packet.getPosition().getZ());
         int breakTime = (int) (65535 / Math.ceil(BlockUtils.getBreakTime(session, BlockRegistries.JAVA_BLOCKS.get(state), ItemMapping.AIR, new CompoundTag(""), false) * 20));
         LevelEventPacket levelEventPacket = new LevelEventPacket();

programming_language: Java
filename: JavaBlockChangeTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -42,7 +42,7 @@ import org.geysermc.connector.utils.ChunkUtils;
 public class JavaBlockChangeTranslator extends PacketTranslator<ServerBlockChangePacket> {
 
     @Override
-    public void translate(ServerBlockChangePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerBlockChangePacket packet) {
         Position pos = packet.getRecord().getPosition();
         boolean updatePlacement = session.getConnector().getPlatformType() != PlatformType.SPIGOT && // Spigot simply listens for the block place event
                 session.getConnector().getWorldManager().getBlockAt(session, pos) != packet.getRecord().getBlock();

programming_language: Java
filename: JavaBlockValueTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -45,7 +45,7 @@ import java.util.concurrent.TimeUnit;
 public class JavaBlockValueTranslator extends PacketTranslator<ServerBlockValuePacket> {
 
     @Override
-    public void translate(ServerBlockValuePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerBlockValuePacket packet) {
         BlockEventPacket blockEventPacket = new BlockEventPacket();
         blockEventPacket.setBlockPosition(Vector3i.from(packet.getPosition().getX(),
                 packet.getPosition().getY(), packet.getPosition().getZ()));

programming_language: Java
filename: JavaChunkDataTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -52,7 +52,7 @@ public class JavaChunkDataTranslator extends PacketTranslator<ServerChunkDataPac
     private static final boolean NEW_BIOME_WRITE = GeyserConnector.getInstance().getConfig().isExtendedWorldHeight();
 
     @Override
-    public void translate(ServerChunkDataPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerChunkDataPacket packet) {
         if (session.isSpawned()) {
             ChunkUtils.updateChunkPosition(session, session.getPlayerEntity().getPosition().toInt());
         }

programming_language: Java
filename: JavaExplosionTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -43,7 +43,7 @@ import org.geysermc.connector.utils.ChunkUtils;
 public class JavaExplosionTranslator extends PacketTranslator<ServerExplosionPacket> {
 
     @Override
-    public void translate(ServerExplosionPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerExplosionPacket packet) {
         for (ExplodedBlockRecord record : packet.getExploded()) {
             Vector3f pos = Vector3f.from(packet.getX() + record.getX(), packet.getY() + record.getY(), packet.getZ() + record.getZ());
             ChunkUtils.updateBlock(session, BlockStateValues.JAVA_AIR_ID, pos.toInt());

programming_language: Java
filename: JavaMapDataTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -41,7 +41,7 @@ import org.geysermc.connector.utils.MapColor;
 @Translator(packet = ServerMapDataPacket.class)
 public class JavaMapDataTranslator extends PacketTranslator<ServerMapDataPacket> {
     @Override
-    public void translate(ServerMapDataPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerMapDataPacket packet) {
         ClientboundMapItemDataPacket mapItemDataPacket = new ClientboundMapItemDataPacket();
         boolean shouldStore = false;
 

programming_language: Java
filename: JavaMultiBlockChangeTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -37,7 +37,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.server.world.ServerMultiB
 public class JavaMultiBlockChangeTranslator extends PacketTranslator<ServerMultiBlockChangePacket> {
 
     @Override
-    public void translate(ServerMultiBlockChangePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerMultiBlockChangePacket packet) {
         for (BlockChangeRecord record : packet.getRecords()) {
             ChunkUtils.updateBlock(session, record.getBlock(), record.getPosition());
         }

programming_language: Java
filename: JavaNotifyClientTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -49,7 +49,7 @@ import org.geysermc.connector.utils.LocaleUtils;
 public class JavaNotifyClientTranslator extends PacketTranslator<ServerNotifyClientPacket> {
 
     @Override
-    public void translate(ServerNotifyClientPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerNotifyClientPacket packet) {
         PlayerEntity entity = session.getPlayerEntity();
 
         switch (packet.getNotification()) {

programming_language: Java
filename: JavaPlayBuiltinSoundTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -44,7 +44,7 @@ import org.geysermc.connector.registry.type.SoundMapping;
 public class JavaPlayBuiltinSoundTranslator extends PacketTranslator<ServerPlayBuiltinSoundPacket> {
 
     @Override
-    public void translate(ServerPlayBuiltinSoundPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerPlayBuiltinSoundPacket packet) {
         String packetSound = packet.getSound().getName();
 
         SoundMapping soundMapping = Registries.SOUNDS.get(packetSound);

programming_language: Scala
filename: JavaPlayEffectTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -48,7 +48,7 @@ import java.util.Locale;
 public class JavaPlayEffectTranslator extends PacketTranslator<ServerPlayEffectPacket> {
 
     @Override
-    public void translate(ServerPlayEffectPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerPlayEffectPacket packet) {
         // Separate case since each RecordEffectData in Java is an individual track in Bedrock
         if (packet.getEffect() == SoundEffect.RECORD) {
             RecordEffectData recordEffectData = (RecordEffectData) packet.getData();

programming_language: Java
filename: JavaPlaySoundTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -40,7 +40,7 @@ import org.geysermc.connector.registry.type.SoundMapping;
 public class JavaPlaySoundTranslator extends PacketTranslator<ServerPlaySoundPacket> {
 
     @Override
-    public void translate(ServerPlaySoundPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerPlaySoundPacket packet) {
         String packetSound;
         if (packet.getSound() instanceof BuiltinSound) {
             packetSound = ((BuiltinSound) packet.getSound()).getName();

programming_language: Java
filename: JavaSpawnParticleTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -50,7 +50,7 @@ import java.util.function.Function;
 public class JavaSpawnParticleTranslator extends PacketTranslator<ServerSpawnParticlePacket> {
 
     @Override
-    public void translate(ServerSpawnParticlePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerSpawnParticlePacket packet) {
         Function<Vector3f, BedrockPacket> particleCreateFunction = createParticle(session, packet.getParticle());
         if (particleCreateFunction != null) {
             if (packet.getAmount() == 0) {

programming_language: Java
filename: JavaSpawnPositionTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -38,7 +38,7 @@ import org.geysermc.connector.utils.DimensionUtils;
 public class JavaSpawnPositionTranslator extends PacketTranslator<ServerSpawnPositionPacket> {
 
     @Override
-    public void translate(ServerSpawnPositionPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerSpawnPositionPacket packet) {
         SetSpawnPositionPacket spawnPositionPacket = new SetSpawnPositionPacket();
         spawnPositionPacket.setBlockPosition(Vector3i.from(packet.getPosition().getX(), packet.getPosition().getY(), packet.getPosition().getZ()));
         spawnPositionPacket.setSpawnForced(true);

programming_language: Java
filename: JavaStopSoundTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -39,7 +39,7 @@ import org.geysermc.connector.registry.type.SoundMapping;
 public class JavaStopSoundTranslator extends PacketTranslator<ServerStopSoundPacket> {
 
     @Override
-    public void translate(ServerStopSoundPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerStopSoundPacket packet) {
         // Runs if all sounds are stopped
         if (packet.getSound() == null) {
             StopSoundPacket stopPacket = new StopSoundPacket();

programming_language: Java
filename: JavaTradeListTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -51,7 +51,7 @@ import java.util.List;
 public class JavaTradeListTranslator extends PacketTranslator<ServerTradeListPacket> {
 
     @Override
-    public void translate(ServerTradeListPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerTradeListPacket packet) {
         Inventory openInventory = session.getOpenInventory();
         if (!(openInventory instanceof MerchantContainer && openInventory.getId() == packet.getWindowId())) {
             return;

programming_language: Java
filename: JavaUnloadChunkTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -37,7 +37,7 @@ import java.util.Iterator;
 public class JavaUnloadChunkTranslator extends PacketTranslator<ServerUnloadChunkPacket> {
 
     @Override
-    public void translate(ServerUnloadChunkPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerUnloadChunkPacket packet) {
         session.getChunkCache().removeChunk(packet.getX(), packet.getZ());
 
         //Checks if a skull is in an unloaded chunk then removes it

programming_language: Java
filename: JavaUpdateTileEntityTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -45,7 +45,7 @@ import org.geysermc.connector.utils.BlockEntityUtils;
 public class JavaUpdateTileEntityTranslator extends PacketTranslator<ServerUpdateTileEntityPacket> {
 
     @Override
-    public void translate(ServerUpdateTileEntityPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerUpdateTileEntityPacket packet) {
         String id = BlockEntityUtils.getBedrockBlockEntityId(packet.getType().name());
         if (packet.getNbt().isEmpty()) { // Fixes errors in servers sending empty NBT
             BlockEntityUtils.updateBlockEntity(session, NbtMap.EMPTY, packet.getPosition());

programming_language: Java
filename: JavaUpdateTimeTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class JavaUpdateTimeTranslator extends PacketTranslator<ServerUpdateTimePacket> {
 
     @Override
-    public void translate(ServerUpdateTimePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerUpdateTimePacket packet) {
         // Bedrock sends a GameRulesChangedPacket if there is no daylight cycle
         // Java just sends a negative long if there is no daylight cycle
         long time = packet.getTime();

programming_language: Java
filename: JavaUpdateViewDistanceTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.server.world.ServerUpdate
 public class JavaUpdateViewDistanceTranslator extends PacketTranslator<ServerUpdateViewDistancePacket> {
 
     @Override
-    public void translate(ServerUpdateViewDistancePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerUpdateViewDistancePacket packet) {
         session.setRenderDistance(packet.getViewDistance());
     }
 }

programming_language: Java
filename: JavaUpdateViewPositionTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -37,7 +37,7 @@ import com.nukkitx.math.vector.Vector3i;
 public class JavaUpdateViewPositionTranslator extends PacketTranslator<ServerUpdateViewPositionPacket> {
 
     @Override
-    public void translate(ServerUpdateViewPositionPacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerUpdateViewPositionPacket packet) {
         if (!session.isSpawned() && session.getLastChunkPosition() == null) {
             ChunkUtils.updateChunkPosition(session, Vector3i.from(packet.getChunkX() << 4, 64, packet.getChunkZ() << 4));
         }

programming_language: Java
filename: JavaVehicleMoveTranslator.java
change_type: ModificationType.MODIFY
diff: @@ -36,7 +36,7 @@ import org.geysermc.connector.network.translators.Translator;
 public class JavaVehicleMoveTranslator extends PacketTranslator<ServerVehicleMovePacket> {
 
     @Override
-    public void translate(ServerVehicleMovePacket packet, GeyserSession session) {
+    public void translate(GeyserSession session, ServerVehicleMovePacket packet) {
         Entity entity = session.getRidingVehicleEntity();
         if (entity == null) return;
 

programming_language: Java
filename: LoginEncryptionUtils.java
change_type: ModificationType.MODIFY
diff: @@ -31,6 +31,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.JsonNodeType;
 import com.github.steveice10.mc.auth.service.MsaAuthenticationService;
 import com.nimbusds.jose.JWSObject;
+import com.nimbusds.jose.shaded.json.JSONObject;
+import com.nimbusds.jose.shaded.json.JSONValue;
 import com.nukkitx.network.util.Preconditions;
 import com.nukkitx.protocol.bedrock.packet.LoginPacket;
 import com.nukkitx.protocol.bedrock.packet.ServerToClientHandshakePacket;
@@ -49,6 +51,7 @@ import org.geysermc.cumulus.response.SimpleFormResponse;
 
 import javax.crypto.SecretKey;
 import java.io.IOException;
+import java.net.URI;
 import java.security.KeyPair;
 import java.security.KeyPairGenerator;
 import java.security.PublicKey;
@@ -62,28 +65,49 @@ public class LoginEncryptionUtils {
     private static boolean HAS_SENT_ENCRYPTION_MESSAGE = false;
 
     private static boolean validateChainData(JsonNode data) throws Exception {
+        if (data.size() != 3) {
+            return false;
+        }
+
         ECPublicKey lastKey = null;
         boolean validChain = false;
         for (JsonNode node : data) {
             JWSObject jwt = JWSObject.parse(node.asText());
 
-            if (!validChain) {
-                validChain = EncryptionUtils.verifyJwt(jwt, EncryptionUtils.getMojangPublicKey());
+            // x509 cert is expected in every claim
+            URI x5u = jwt.getHeader().getX509CertURL();
+            if (x5u == null) {
+                return false;
             }
 
-            if (lastKey != null) {
-                if (!EncryptionUtils.verifyJwt(jwt, lastKey)) return false;
+            ECPublicKey expectedKey = EncryptionUtils.generateKey(jwt.getHeader().getX509CertURL().toString());
+            // First key is self-signed
+            if (lastKey == null) {
+                lastKey = expectedKey;
+            } else if (!lastKey.equals(expectedKey)) {
+                return false;
             }
 
-            JsonNode payloadNode = JSON_MAPPER.readTree(jwt.getPayload().toString());
-            JsonNode ipkNode = payloadNode.get("identityPublicKey");
-            Preconditions.checkState(ipkNode != null && ipkNode.getNodeType() == JsonNodeType.STRING, "identityPublicKey node is missing in chain");
-            lastKey = EncryptionUtils.generateKey(ipkNode.asText());
+            if (!EncryptionUtils.verifyJwt(jwt, lastKey)) {
+                return false;
+            }
+
+            if (lastKey.equals(EncryptionUtils.getMojangPublicKey())) {
+                validChain = true;
+            }
+
+            Object payload = JSONValue.parse(jwt.getPayload().toString());
+            Preconditions.checkArgument(payload instanceof JSONObject, "Payload is not an object");
+
+            Object identityPublicKey = ((JSONObject) payload).get("identityPublicKey");
+            Preconditions.checkArgument(identityPublicKey instanceof String, "identityPublicKey node is missing in chain");
+            lastKey = EncryptionUtils.generateKey((String) identityPublicKey);
         }
+
         return validChain;
     }
 
-    public static void encryptPlayerConnection(GeyserConnector connector, GeyserSession session, LoginPacket loginPacket) {
+    public static void encryptPlayerConnection(GeyserSession session, LoginPacket loginPacket) {
         JsonNode certData;
         try {
             certData = JSON_MAPPER.readTree(loginPacket.getChainData().toByteArray());
@@ -96,11 +120,13 @@ public class LoginEncryptionUtils {
             throw new RuntimeException("Certificate data is not valid");
         }
 
-        encryptConnectionWithCert(connector, session, loginPacket.getSkinData().toString(), certChainData);
+        encryptConnectionWithCert(session, loginPacket.getSkinData().toString(), certChainData);
     }
 
-    private static void encryptConnectionWithCert(GeyserConnector connector, GeyserSession session, String clientData, JsonNode certChainData) {
+    private static void encryptConnectionWithCert(GeyserSession session, String clientData, JsonNode certChainData) {
         try {
+            GeyserConnector connector = session.getConnector();
+
             boolean validChain = validateChainData(certChainData);
 
             connector.getLogger().debug(String.format("Is player data valid? %s", validChain));

programming_language: Java
filename: pom.xml
change_type: ModificationType.MODIFY
diff: @@ -5,7 +5,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.geysermc</groupId>
     <artifactId>geyser-parent</artifactId>
-    <version>1.4.1-SNAPSHOT</version>
+    <version>1.4.2-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>Geyser</name>
     <description>Allows for players from Minecraft Bedrock Edition to join Minecraft Java Edition servers.</description>

programming_language: Markdown