Fix being unable to clear selected text in number boxes (#242)

This commit is contained in:
Domi
2023-03-20 19:53:11 +01:00
committed by GitHub
parent b76c9f1371
commit b6f4bdb64d
@@ -37,6 +37,9 @@ public class GuiNumberBox extends GuiTextField {
final String original = this.getText();
super.writeText(selectedText);
if (this.getText().isEmpty()) {
return;
}
try {
if (this.type == int.class || this.type == Integer.class) {
Integer.parseInt(this.getText());