diff --git a/Artifacts/SubServers.Bungee.jar b/Artifacts/SubServers.Bungee.jar index 03dd97cb..14866f85 100644 Binary files a/Artifacts/SubServers.Bungee.jar and b/Artifacts/SubServers.Bungee.jar differ diff --git a/Artifacts/SubServers.Client.Bukkit.jar b/Artifacts/SubServers.Client.Bukkit.jar index 6d788f9a..488568e2 100644 Binary files a/Artifacts/SubServers.Client.Bukkit.jar and b/Artifacts/SubServers.Client.Bukkit.jar differ diff --git a/Artifacts/SubServers.Console.jar b/Artifacts/SubServers.Console.jar index b163f085..7e003029 100644 Binary files a/Artifacts/SubServers.Console.jar and b/Artifacts/SubServers.Console.jar differ diff --git a/Artifacts/SubServers.Host.jar b/Artifacts/SubServers.Host.jar index 8ad0359c..e78c83f3 100644 Binary files a/Artifacts/SubServers.Host.jar and b/Artifacts/SubServers.Host.jar differ diff --git a/Artifacts/SubServers.Sync.jar b/Artifacts/SubServers.Sync.jar index 8c5e6d00..594223f2 100644 Binary files a/Artifacts/SubServers.Sync.jar and b/Artifacts/SubServers.Sync.jar differ diff --git a/Javadoc/SubServers.Bungee.jar b/Javadoc/SubServers.Bungee.jar index 8e282403..3f69b1d8 100644 Binary files a/Javadoc/SubServers.Bungee.jar and b/Javadoc/SubServers.Bungee.jar differ diff --git a/Javadoc/SubServers.Client.Bukkit.jar b/Javadoc/SubServers.Client.Bukkit.jar index 7ccaba1c..83f0da4d 100644 Binary files a/Javadoc/SubServers.Client.Bukkit.jar and b/Javadoc/SubServers.Client.Bukkit.jar differ diff --git a/Javadoc/SubServers.Host.jar b/Javadoc/SubServers.Host.jar index 3458becd..1c8bd49d 100644 Binary files a/Javadoc/SubServers.Host.jar and b/Javadoc/SubServers.Host.jar differ diff --git a/Javadoc/SubServers.Sync.jar b/Javadoc/SubServers.Sync.jar index d18569ff..1044f69a 100644 Binary files a/Javadoc/SubServers.Sync.jar and b/Javadoc/SubServers.Sync.jar differ diff --git a/SubServers.Bungee/src.jar b/SubServers.Bungee/src.jar index 7e4e6d54..84f18a5e 100644 Binary files a/SubServers.Bungee/src.jar and b/SubServers.Bungee/src.jar differ diff --git a/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/SubAPI.java b/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/SubAPI.java index 352136ba..f394e661 100644 --- a/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/SubAPI.java +++ b/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/SubAPI.java @@ -675,7 +675,14 @@ public final class SubAPI { return new Version(System.getProperty("subservers.minecraft.version")); } else { String raw = plugin.getGameVersion(); - if (raw.contains(",")) { + if (raw == null) { + if (System.getProperty("subservers.minecraft.version.unknown", "false").equalsIgnoreCase("false")) { + System.setProperty("subservers.minecraft.version.unknown", "true"); + System.out.println("Could not determine compatible Minecraft version(s); Now using 1.x.x as a placeholder."); + System.out.println("Use this launch argument to specify a compatible Minecraft version: -Dsubservers.minecraft.version=1.x.x"); + } + return new Version("1.x.x"); + } else if (raw.contains(",")) { String[] split = raw.split(",\\s*"); return new Version(split[split.length - 1]); } else if (raw.contains("-")) { diff --git a/SubServers.Client/Bukkit/src.jar b/SubServers.Client/Bukkit/src.jar index d1112420..1c9a4ed2 100644 Binary files a/SubServers.Client/Bukkit/src.jar and b/SubServers.Client/Bukkit/src.jar differ diff --git a/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/SubAPI.java b/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/SubAPI.java index d32f0cb1..1c37fd5e 100644 --- a/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/SubAPI.java +++ b/SubServers.Client/Bukkit/src/net/ME1312/SubServers/Client/Bukkit/SubAPI.java @@ -141,7 +141,12 @@ public final class SubAPI { try { return new Version(Bukkit.getBukkitVersion().split("-")[0]); } catch (ArrayIndexOutOfBoundsException e) { - return new Version(plugin.version.toString().substring(0, plugin.version.toString().length() - 1)); + if (System.getProperty("subservers.minecraft.version.unknown", "false").equalsIgnoreCase("false")) { + System.setProperty("subservers.minecraft.version.unknown", "true"); + System.out.println("Could not determine this server's game version; Now using 1.x.x as a placeholder."); + System.out.println("Use this launch argument to specify what version this server serves: -Dsubservers.minecraft.version=1.x.x"); + } + return new Version("1.x.x"); } } } diff --git a/SubServers.Host/src.jar b/SubServers.Host/src.jar index 077ad819..b380805b 100644 Binary files a/SubServers.Host/src.jar and b/SubServers.Host/src.jar differ diff --git a/SubServers.Host/src/net/ME1312/SubServers/Host/ExHost.java b/SubServers.Host/src/net/ME1312/SubServers/Host/ExHost.java index c4235033..0f282eec 100644 --- a/SubServers.Host/src/net/ME1312/SubServers/Host/ExHost.java +++ b/SubServers.Host/src/net/ME1312/SubServers/Host/ExHost.java @@ -507,6 +507,8 @@ public final class ExHost { } if (subdata != null) Util.isException(() -> subdata.destroy(0)); + if (new File(dir, "Templates").exists()) Util.deleteDirectory(new File(dir, "Templates")); + Util.isException(FileLogger::end); System.exit(exit); } diff --git a/SubServers.Host/src/net/ME1312/SubServers/Host/Library/Log/FileLogger.java b/SubServers.Host/src/net/ME1312/SubServers/Host/Library/Log/FileLogger.java index 357bd870..ab61425a 100644 --- a/SubServers.Host/src/net/ME1312/SubServers/Host/Library/Log/FileLogger.java +++ b/SubServers.Host/src/net/ME1312/SubServers/Host/Library/Log/FileLogger.java @@ -19,7 +19,7 @@ public final class FileLogger extends OutputStream { this.origin = origin; if (file == null) { new File(dir, "Logs").mkdirs(); - file = new FileWriter(new File(dir, "Logs" + File.separator + "SubServers #" + (new File(dir, "Logs").list().length + 1) + " (" + new SimpleDateFormat("MM-dd-yyyy").format(Calendar.getInstance().getTime()) + ").log")); + file = new FileWriter(new File(dir, "Logs" + File.separator + "SubServers.Host #" + (new File(dir, "Logs").list().length + 1) + " (" + new SimpleDateFormat("MM-dd-yyyy").format(Calendar.getInstance().getTime()) + ").log")); } } diff --git a/SubServers.Host/src/net/ME1312/SubServers/Host/SubAPI.java b/SubServers.Host/src/net/ME1312/SubServers/Host/SubAPI.java index 9a48ab02..f795b9a7 100644 --- a/SubServers.Host/src/net/ME1312/SubServers/Host/SubAPI.java +++ b/SubServers.Host/src/net/ME1312/SubServers/Host/SubAPI.java @@ -89,7 +89,7 @@ public final class SubAPI { */ public void addCommand(Command command, String... handles) { for (String handle : handles) { - commands.put(handle, command); + commands.put(handle.toLowerCase(), command); } } diff --git a/SubServers.Sync/src.jar b/SubServers.Sync/src.jar index 05f1de00..4fba2721 100644 Binary files a/SubServers.Sync/src.jar and b/SubServers.Sync/src.jar differ diff --git a/SubServers.Sync/src/net/ME1312/SubServers/Sync/SubAPI.java b/SubServers.Sync/src/net/ME1312/SubServers/Sync/SubAPI.java index 5758b004..cf384ddd 100644 --- a/SubServers.Sync/src/net/ME1312/SubServers/Sync/SubAPI.java +++ b/SubServers.Sync/src/net/ME1312/SubServers/Sync/SubAPI.java @@ -150,7 +150,14 @@ public final class SubAPI { return new Version(System.getProperty("subservers.minecraft.version")); } else { String raw = plugin.getGameVersion(); - if (raw.contains(",")) { + if (raw == null) { + if (System.getProperty("subservers.minecraft.version.unknown", "false").equalsIgnoreCase("false")) { + System.setProperty("subservers.minecraft.version.unknown", "true"); + System.out.println("Could not determine compatible Minecraft version(s); Now using 1.x.x as a placeholder."); + System.out.println("Use this launch argument to specify a compatible Minecraft version: -Dsubservers.minecraft.version=1.x.x"); + } + return new Version("1.x.x"); + } else if (raw.contains(",")) { String[] split = raw.split(",\\s*"); return new Version(split[split.length - 1]); } else if (raw.contains("-")) {