Merge pull request #609 from Fam0r/authors-fix

Better parsing for /map authors/realmowner
This commit is contained in:
UnknownShadow200 2021-05-17 21:05:12 +10:00 committed by GitHub
commit b902cd50f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,7 +102,7 @@ namespace MCGalaxy {
} }
static void SetOwner(Player p, Level lvl, string value) { static void SetOwner(Player p, Level lvl, string value) {
lvl.Config.RealmOwner = value.Replace(' ', ','); lvl.Config.RealmOwner = value.Replace(", ", ",").Replace(" ", ",");
if (value.Length == 0) p.Message("Removed realm owner for this level."); if (value.Length == 0) p.Message("Removed realm owner for this level.");
else p.Message("Set realm owner/owners of this level to {0}.", value); else p.Message("Set realm owner/owners of this level to {0}.", value);
} }
@ -203,7 +203,7 @@ namespace MCGalaxy {
} }
static void SetAuthors(Player p, Level lvl, string value) { static void SetAuthors(Player p, Level lvl, string value) {
lvl.Config.Authors = value.Replace(" ", "&S, "); lvl.Config.Authors = value.Replace(", ", ",").Replace(" ", ",");
p.Message("Map authors set to: &b" + lvl.Config.Authors); p.Message("Map authors set to: &b" + lvl.Config.Authors);
} }