fix: minigane name on world configuration screen

This commit is contained in:
CyberL1 2024-12-13 21:41:33 +01:00
parent 4605ac5fef
commit 8c72940c23

View File

@ -419,7 +419,7 @@ namespace Minecraft_Realms_Emulator.Modes.External
string cookie = Request.Headers.Cookie; string cookie = Request.Headers.Cookie;
string gameVersion = cookie.Split(";")[2].Split("=")[1]; string gameVersion = cookie.Split(";")[2].Split("=")[1];
var world = await _context.Worlds.Include(w => w.Players).Include(w => w.Subscription).Include(w => w.Slots).Include(w => w.ParentWorld.Subscription).FirstOrDefaultAsync(w => w.Id == wId); var world = await _context.Worlds.Include(w => w.Players).Include(w => w.Subscription).Include(w => w.Slots).Include(w => w.ParentWorld.Subscription).Include(w => w.Minigame).FirstOrDefaultAsync(w => w.Id == wId);
if (world.State == nameof(StateEnum.UNINITIALIZED)) if (world.State == nameof(StateEnum.UNINITIALIZED))
{ {
@ -721,7 +721,7 @@ namespace Minecraft_Realms_Emulator.Modes.External
slot.CommandBlocks = body.CommandBlocks; slot.CommandBlocks = body.CommandBlocks;
_context.SaveChanges(); _context.SaveChanges();
return Ok(true); return Ok(true);
} }
@ -854,7 +854,7 @@ namespace Minecraft_Realms_Emulator.Modes.External
var totalTemplates = _context.Templates.Where(t => t.Type == type).Count(); var totalTemplates = _context.Templates.Where(t => t.Type == type).Count();
var templates = _context.Templates.Where(t => t.Type == type).Skip((page - 1) * pageSize).Take(pageSize).ToList(); var templates = _context.Templates.Where(t => t.Type == type).Skip((page - 1) * pageSize).Take(pageSize).ToList();
TemplatesResponse templatesResponse = new() TemplatesResponse templatesResponse = new()
{ {
Page = page, Page = page,
Size = pageSize, Size = pageSize,