diff --git a/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Launch.java b/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Launch.java index 59ad9ce2..46c3d091 100644 --- a/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Launch.java +++ b/SubServers.Bungee/src/net/ME1312/SubServers/Bungee/Launch.java @@ -99,8 +99,11 @@ public final class Launch { if (!options.has("noconsole")) { try { - if (Util.getDespiteException(() -> Class.forName("io.github.waterfallmc.waterfall.console.WaterfallConsole") != null, false)) { + if (Util.getDespiteException(() -> Class.forName("io.github.waterfallmc.waterfall.console.WaterfallConsole").getMethod("readCommands") != null, false)) { Class.forName("io.github.waterfallmc.waterfall.console.WaterfallConsole").getMethod("readCommands").invoke(null); + } else if (Util.getDespiteException(() -> Class.forName("io.github.waterfallmc.waterfall.console.WaterfallConsole").getMethod("start") != null, false)) { + Class console = Class.forName("io.github.waterfallmc.waterfall.console.WaterfallConsole"); + console.getMethod("start").invoke(console.getConstructor().newInstance()); } else { plugin.canSudo = true; String line; diff --git a/SubServers.Sync/src/net/ME1312/SubServers/Sync/Launch.java b/SubServers.Sync/src/net/ME1312/SubServers/Sync/Launch.java index eb724157..5b7b4fab 100644 --- a/SubServers.Sync/src/net/ME1312/SubServers/Sync/Launch.java +++ b/SubServers.Sync/src/net/ME1312/SubServers/Sync/Launch.java @@ -101,6 +101,9 @@ public final class Launch { try { if (Util.getDespiteException(() -> Class.forName("io.github.waterfallmc.waterfall.console.WaterfallConsole") != null, false)) { Class.forName("io.github.waterfallmc.waterfall.console.WaterfallConsole").getMethod("readCommands").invoke(null); + } else if (Util.getDespiteException(() -> Class.forName("io.github.waterfallmc.waterfall.console.WaterfallConsole").getMethod("start") != null, false)) { + Class console = Class.forName("io.github.waterfallmc.waterfall.console.WaterfallConsole"); + console.getMethod("start").invoke(console.getConstructor().newInstance()); } else { String line; while (plugin.isRunning && (line = plugin.getConsoleReader().readLine(">")) != null) {