Fixed keys being stuck during typing.
This commit is contained in:
parent
f9d3d35be4
commit
c6d54d3f38
|
@ -20,6 +20,15 @@ public class PlayerKeyListener extends KeyAdapter {
|
||||||
if (!this.chatManager.isChatting()) {
|
if (!this.chatManager.isChatting()) {
|
||||||
if ((e.getKeyChar() == 't' || e.getKeyChar() == '/')) {
|
if ((e.getKeyChar() == 't' || e.getKeyChar() == '/')) {
|
||||||
this.chatManager.setChatting(true);
|
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('/');
|
if (e.getKeyChar() == '/') this.chatManager.appendToChat('/');
|
||||||
}
|
}
|
||||||
} else if (this.chatManager.isChatting()) {
|
} else if (this.chatManager.isChatting()) {
|
||||||
|
|
|
@ -49,7 +49,6 @@ public class Server {
|
||||||
this.worldUpdater = new WorldUpdater(this, this.world);
|
this.worldUpdater = new WorldUpdater(this, this.world);
|
||||||
this.chatManager = new ChatManager(this);
|
this.chatManager = new ChatManager(this);
|
||||||
if (settings.getRegistrySettings().isDiscoverable()) {
|
if (settings.getRegistrySettings().isDiscoverable()) {
|
||||||
System.out.println("Starting registry communications.");
|
|
||||||
this.registryManager = new RegistryManager(this);
|
this.registryManager = new RegistryManager(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue