mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 12:42:22 -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) {
|
static string NextLevel(Player p) {
|
||||||
string[] allLevelNames = LevelInfo.AllMapNames();
|
string[] allMaps = LevelInfo.AllMapNames();
|
||||||
List<string> levelNames = Wildcard.Filter(allLevelNames, p.name.ToLower() + "*", levelName => levelName);
|
|
||||||
|
|
||||||
int realmsOwned = 0;
|
int realmsOwned = 0;
|
||||||
for (int i = 0; i < levelNames.Count; i++) {
|
foreach (string lvlName in allMaps)
|
||||||
string levelName = levelNames[i];
|
{
|
||||||
|
if (!lvlName.CaselessStarts(p.name)) continue;
|
||||||
|
|
||||||
if (LevelInfo.IsRealmOwner(p.name, levelName)) {
|
if (LevelInfo.IsRealmOwner(p.name, lvlName)) {
|
||||||
realmsOwned += 1;
|
realmsOwned += 1;
|
||||||
if (realmsOwned >= p.group.OverseerMaps) {
|
if (realmsOwned >= p.group.OverseerMaps) {
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user