From 7f65e66d8395e24b8a123eea57cb4f65914a3464 Mon Sep 17 00:00:00 2001 From: atom0s Date: Mon, 26 May 2014 16:50:41 -0700 Subject: [PATCH] Prevent collection modification. --- TShockAPI/Commands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 3f988a8d..b4deefb9 100755 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -567,7 +567,7 @@ namespace TShockAPI string cmdName = args[0].ToLower(); args.RemoveAt(0); - IEnumerable cmds = ChatCommands.Where(c => c.HasAlias(cmdName)); + IEnumerable cmds = ChatCommands.Where(c => c.HasAlias(cmdName)).ToList(); if (Hooks.PlayerHooks.OnPlayerCommand(player, cmdName, cmdText, args, ref cmds)) return true;