Improves console and GUI messages
All checks were successful
KnarCraft/Minecraft-Server-Launcher/pipeline/head This commit looks good

Adds newlines when writing to console
Add Error: on lines containing an error
Makes it clearer when a jar build is successful
Makes failures show errors rather than throwing exceptions
This commit is contained in:
2021-08-02 17:57:09 +02:00
parent d61239c417
commit 6ec44f1f92
3 changed files with 26 additions and 15 deletions

View File

@ -27,7 +27,9 @@ public abstract class MessageHandler implements GUI {
public void showError(String title, String message) {
if (silent) {
try {
writer.write("Error: ");
writer.write(message);
writer.newLine();
writer.flush();
} catch (IOException e) {
System.out.println(message);
@ -47,6 +49,7 @@ public abstract class MessageHandler implements GUI {
if (silent) {
try {
writer.write(message);
writer.newLine();
writer.flush();
} catch (IOException e) {
System.out.println(message);