Skip to content

Commit

Permalink
Disallow commas in award names
Browse files Browse the repository at this point in the history
Commas break the parser because they are the separator character in playerAwards.txt
  • Loading branch information
Goodlyay committed Feb 4, 2024
1 parent 3899108 commit c829f5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MCGalaxy/Modules/Awards/CmdAwardMod.cs
Expand Up @@ -40,6 +40,8 @@ public sealed class CmdAwardMod : Command2
string award = args[0].Trim();
string desc = args[1].Trim();

if (award.Contains(",")) { p.Message("&WAward names cannot contain commas."); return; }

if (!AwardsList.Add(award, desc)) {
p.Message("This award already exists."); return;
} else {
Expand Down

0 comments on commit c829f5e

Please sign in to comment.