fix: catch more edge cases

This commit is contained in:
anavoi 2025-07-13 23:55:54 +02:00
commit b9a7a1c479
4 changed files with 28 additions and 25 deletions

View file

@ -60,6 +60,10 @@ public class Plugin : BaseUnityPlugin
{
Helper.serverip = CommandLineParser.Instance.GetValueForKey("-ip", false);
}
else
{
GBSUGui.PushError("Couldn't find the -ip CLI argument. Please refer to the documentation.");
}
if (CommandLineParser.Instance.KeyExists("-port"))
{
int.TryParse(CommandLineParser.Instance.GetValueForKey("-port", false), out Helper.serverport);