mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Check map name directly in /os map add rather than using a regex
This commit is contained in:
parent
7782cdb300
commit
c06e29b163
@ -53,14 +53,14 @@ namespace MCGalaxy.Commands.World {
|
||||
}
|
||||
|
||||
static string NextLevel(Player p) {
|
||||
string[] allLevelNames = LevelInfo.AllMapNames();
|
||||
List<string> levelNames = Wildcard.Filter(allLevelNames, p.name.ToLower() + "*", levelName => levelName);
|
||||
string[] allMaps = LevelInfo.AllMapNames();
|
||||
|
||||
int realmsOwned = 0;
|
||||
for (int i = 0; i < levelNames.Count; i++) {
|
||||
string levelName = levelNames[i];
|
||||
foreach (string lvlName in allMaps)
|
||||
{
|
||||
if (!lvlName.CaselessStarts(p.name)) continue;
|
||||
|
||||
if (LevelInfo.IsRealmOwner(p.name, levelName)) {
|
||||
if (LevelInfo.IsRealmOwner(p.name, lvlName)) {
|
||||
realmsOwned += 1;
|
||||
if (realmsOwned >= p.group.OverseerMaps) {
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user