From 3874c04a72b15717fd8681b95d354adfe5be91a3 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Mon, 25 May 2020 11:55:54 -0700 Subject: [PATCH] Replace -worldpath with -worldselectpath This reverts commit 7ad46abced17113ca4338598c73c172828e43355. This reintroduces the worldpath argument as per request from #1914, but at a different name. This is because users have configurations like this, which no longer work: -world + -worldpath = crash If you want to use -worldselectionpath to specify a world, you should be able to use -worldname, but don't use -world unless you specify an absolute path to a world. No matter how we solve this we get a support headache (-worldpath + -world = crash). This temporary stopgap should work to help address issue #1914 until we can figure out a final solution. Since users are impacted by this change, temporarily adding this back is the best move. To be 100% clear, though: -world + -worldselectpath without specifying an absolute path will result in a crash that is unhelpful. Please don't do that. --- TShockAPI/TShock.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index aa1791d5..0d19a6fb 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -689,6 +689,16 @@ namespace TShockAPI } }) + .AddFlag("-worldselectpath", pathChecker) + .After(() => + { + if (path != null) + { + Main.WorldPath = path; + ServerApi.LogWriter.PluginWriteLine(this, "World path has been set to " + path, TraceLevel.Info); + } + }) + .AddFlag("-logpath", pathChecker) .After(() => {