Fix test issues

This commit is contained in:
MSWS
2024-09-05 23:07:48 -07:00
parent 227bd545d9
commit 55202ebf0b
2 changed files with 10 additions and 8 deletions

View File

@@ -44,11 +44,9 @@ public class CommandInfoWrapper(PlayerWrapper? executor, int offset = 0,
return;
}
Server.NextFrame(() => {
if (CallingContext == CommandCallingContext.Console)
CallingPlayer.PrintToConsole(message);
else
CallingPlayer.PrintToChat(message);
});
if (CallingContext == CommandCallingContext.Console)
CallingPlayer.PrintToConsole(message);
else
CallingPlayer.PrintToChat(message);
}
}

View File

@@ -114,7 +114,9 @@ public class PlayerWrapper {
return;
}
Server.NextFrame(() => Player.PrintToChat(message));
Server.NextFrame(() => {
if (Player.IsValid) Player.PrintToChat(message);
});
}
public void PrintToConsole(string message) {
@@ -124,6 +126,8 @@ public class PlayerWrapper {
return;
}
Server.NextFrame(() => Player.PrintToConsole(message));
Server.NextFrame(() => {
if (Player.IsValid) Player.PrintToConsole(message);
});
}
}