Fixed sending empty command
@@ -73,8 +73,10 @@ public void initialise() {
}
});
commandLine.subscribe(widget -> {
- console.execute(commandLine.getText(), localPlayer.getClientEntity());
- commandLine.setText("");
+ String text = commandLine.getText().trim();
+ if(!text.isEmpty()) {
+ console.execute(text, localPlayer.getClientEntity());
+ }
scrollArea.moveToBottom();
});
