Skip to content

Commit

Permalink
Fix test issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MSWS committed Sep 6, 2024
1 parent 227bd54 commit 55202eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 4 additions & 6 deletions GangsAPI/Data/Command/CommandInfoWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ public void ReplySync(string message) {
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);
}
}
8 changes: 6 additions & 2 deletions GangsAPI/Data/PlayerWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ public void PrintToChat(string message) {
return;
}

Server.NextFrame(() => Player.PrintToChat(message));
Server.NextFrame(() => {
if (Player.IsValid) Player.PrintToChat(message);
});
}

public void PrintToConsole(string message) {
Expand All @@ -124,6 +126,8 @@ public void PrintToConsole(string message) {
return;
}

Server.NextFrame(() => Player.PrintToConsole(message));
Server.NextFrame(() => {
if (Player.IsValid) Player.PrintToConsole(message);
});
}
}

0 comments on commit 55202eb

Please sign in to comment.