From c6d54d3f387ce28e6d13d6afc37bfd02067af672 Mon Sep 17 00:00:00 2001 From: Andrew Lalis Date: Thu, 8 Jul 2021 00:06:54 +0200 Subject: [PATCH] Fixed keys being stuck during typing. --- .../aos_client/control/PlayerKeyListener.java | 9 +++++++++ .../src/main/java/nl/andrewlalis/aos_server/Server.java | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/client/src/main/java/nl/andrewlalis/aos_client/control/PlayerKeyListener.java b/client/src/main/java/nl/andrewlalis/aos_client/control/PlayerKeyListener.java index af5e34b..f9fb041 100644 --- a/client/src/main/java/nl/andrewlalis/aos_client/control/PlayerKeyListener.java +++ b/client/src/main/java/nl/andrewlalis/aos_client/control/PlayerKeyListener.java @@ -20,6 +20,15 @@ public class PlayerKeyListener extends KeyAdapter { if (!this.chatManager.isChatting()) { if ((e.getKeyChar() == 't' || e.getKeyChar() == '/')) { this.chatManager.setChatting(true); + var s = this.client.getPlayer().getState(); + s.setMovingForward(false); + s.setMovingBackward(false); + s.setMovingLeft(false); + s.setMovingRight(false); + s.setReloading(false); + s.setSneaking(false); + s.setSprinting(false); + this.client.sendPlayerState(); if (e.getKeyChar() == '/') this.chatManager.appendToChat('/'); } } else if (this.chatManager.isChatting()) { diff --git a/server/src/main/java/nl/andrewlalis/aos_server/Server.java b/server/src/main/java/nl/andrewlalis/aos_server/Server.java index 6d45b73..e286d06 100644 --- a/server/src/main/java/nl/andrewlalis/aos_server/Server.java +++ b/server/src/main/java/nl/andrewlalis/aos_server/Server.java @@ -49,7 +49,6 @@ public class Server { this.worldUpdater = new WorldUpdater(this, this.world); this.chatManager = new ChatManager(this); if (settings.getRegistrySettings().isDiscoverable()) { - System.out.println("Starting registry communications."); this.registryManager = new RegistryManager(this); } }