We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fc61ff commit 18c3c8bCopy full SHA for 18c3c8b
Essentials/PlayerCommands.cs
@@ -18,10 +18,8 @@ public void Whisper(string playerName)
18
if (Context.Args.Count < 1)
19
return;
20
21
- //var playerName = Context.Args[0];
22
- Console.WriteLine($"'{playerName}'");
23
var msgIndex = Context.RawArgs.IndexOf(" ", playerName.Length);
24
- if (msgIndex > Context.RawArgs.Length)
+ if (msgIndex == -1 || msgIndex > Context.RawArgs.Length - 1)
25
26
27
var message = Context.RawArgs.Substring(msgIndex);
0 commit comments