chatcommands: Don't remove spaces before cleared word (#11017)

This commit is contained in:
JZomerlei
2020-03-18 15:14:47 +01:00
committed by GitHub
parent 84a23cb59d
commit ca063d606c
@@ -72,16 +72,8 @@ public class ChatKeyboardListener implements KeyListener
}
// find next word
int idx = input.lastIndexOf(' ');
final String replacement;
if (idx != -1)
{
replacement = input.substring(0, idx);
}
else
{
replacement = "";
}
int idx = input.lastIndexOf(' ') + 1;
final String replacement = input.substring(0, idx);
clientThread.invoke(() -> applyText(inputTye, replacement));
}