diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/Main.java b/paper-server/src/main/java/org/bukkit/craftbukkit/Main.java index f0863eddbc..0dacd2eeea 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/Main.java @@ -12,6 +12,8 @@ import joptsimple.OptionSet; import net.minecraft.server.MinecraftServer; public class Main { + public static String jlineTerminalSetting = System.getProperty("jline.terminal"); + public static void main(String[] args) { // Todo: Installation script OptionParser parser = new OptionParser() { @@ -65,6 +67,8 @@ public class Main { .ofType(File.class) .defaultsTo(new File("bukkit.yml")) .describedAs("Yml file"); + + acceptsAll(asList("nojline"), "Disables jline and emulates the vanilla console"); } }; @@ -84,6 +88,10 @@ public class Main { } } else { try { + if (options.has("nojline")) { + System.setProperty("jline.terminal", "jline.UnsupportedTerminal"); + System.setProperty("user.language", "en"); + } MinecraftServer.main(options); } catch (Throwable t) { t.printStackTrace(); diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/ShortConsoleLogFormatter.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/ShortConsoleLogFormatter.java index 8d8b4e735e..282f058d90 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/ShortConsoleLogFormatter.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/ShortConsoleLogFormatter.java @@ -26,6 +26,8 @@ public class ShortConsoleLogFormatter extends Formatter { } catch (OptionException ex) { System.err.println("Given date format is not valid. Falling back to default."); } + } else if (options.has("nojline")) { + date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); } if (date == null) {