mirror of
https://github.com/CyberL1/MyMcRealms.git
synced 2024-12-25 22:08:22 -05:00
fix: display motd on >1.21.1
This commit is contained in:
parent
8f94aa8bdd
commit
0e06049d6e
8
Gamemode.cs
Normal file
8
Gamemode.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
public enum Gamemode
|
||||||
|
{
|
||||||
|
survival,
|
||||||
|
creative,
|
||||||
|
adventure
|
||||||
|
}
|
@ -90,6 +90,10 @@ namespace MyMcRealms.Controllers
|
|||||||
ActiveVersion = world.GameVersion
|
ActiveVersion = world.GameVersion
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (world.Gamemode == "survival") response.GameMode = 0;
|
||||||
|
if (world.Gamemode == "creative") response.GameMode = 1;
|
||||||
|
if (world.Gamemode == "adventure") response.GameMode = 2;
|
||||||
|
|
||||||
allWorlds.Add(response);
|
allWorlds.Add(response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -185,6 +189,10 @@ namespace MyMcRealms.Controllers
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (world.Gamemode == "survival") response.GameMode = 0;
|
||||||
|
if (world.Gamemode == "creative") response.GameMode = 1;
|
||||||
|
if (world.Gamemode == "adventure") response.GameMode = 2;
|
||||||
|
|
||||||
return Ok(response);
|
return Ok(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
public List<Whitelist> Whitelist { get; set; } = null!;
|
public List<Whitelist> Whitelist { get; set; } = null!;
|
||||||
public bool WhitelistEnable { get; set; }
|
public bool WhitelistEnable { get; set; }
|
||||||
public string OwnersToken { get; set; } = string.Empty;
|
public string OwnersToken { get; set; } = string.Empty;
|
||||||
|
public string Gamemode { get; set; } = null!;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Op
|
public class Op
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
public string? OwnerUUID { get; set; }
|
public string? OwnerUUID { get; set; }
|
||||||
public string? Name { get; set; }
|
public string? Name { get; set; }
|
||||||
public string? Motd { get; set; }
|
public string? Motd { get; set; }
|
||||||
|
public int GameMode { get; set; }
|
||||||
|
public bool Hardcore { get; set; }
|
||||||
public string State { get; set; } = "OPEN";
|
public string State { get; set; } = "OPEN";
|
||||||
public string WorldType { get; set; } = "NORMAL";
|
public string WorldType { get; set; } = "NORMAL";
|
||||||
public List<PlayerResponse> Players { get; set; } = [];
|
public List<PlayerResponse> Players { get; set; } = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user