From 6b9c7fa678c797fb701b1a28feeb36734abd0de3 Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Thu, 28 Jul 2011 00:46:18 -0400 Subject: [PATCH] Added Version startup argument to Main. Thanks cyberdudedk! --- src/main/java/org/bukkit/craftbukkit/Main.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java index 4beb5b77f9..68b9abd289 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -93,6 +93,8 @@ public class Main { .describedAs("Yml file"); acceptsAll(asList("nojline"), "Disables jline and emulates the vanilla console"); + + acceptsAll(asList("v", "version"), "Show the CraftBukkit Version"); } }; @@ -110,6 +112,8 @@ public class Main { } catch (IOException ex) { Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); } + } else if (options.has("v")) { + System.out.println(CraftServer.class.getPackage().getImplementationVersion()); } else { try { useJline = !"jline.UnsupportedTerminal".equals(System.getProperty("jline.terminal"));