Skip to content

Commit

Permalink
Don't run commands in MBs after disconnected, addresses #604 (Thanks …
Browse files Browse the repository at this point in the history
…rdebath)
  • Loading branch information
UnknownShadow200 committed May 14, 2021
1 parent 04d0aa8 commit b28c1ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions MCGalaxy/Player/Player.Handlers.cs
Expand Up @@ -698,6 +698,9 @@ public partial class Player : IDisposable {
bool UseCommands(List<Command> commands, List<string> messages, CommandData data) {
for (int i = 0; i < messages.Count; i++) {
if (!UseCommand(commands[i], messages[i], data)) return false;

// No point running commands after disconnected
if (leftServer) return false;
}
return true;
}
Expand Down

0 comments on commit b28c1ab

Please sign in to comment.