diff --git a/Minecraft-Realms-Emulator/Controllers/Admin/ServersController.cs b/Minecraft-Realms-Emulator/Controllers/Admin/ServersController.cs index 0b49623..4da404d 100644 --- a/Minecraft-Realms-Emulator/Controllers/Admin/ServersController.cs +++ b/Minecraft-Realms-Emulator/Controllers/Admin/ServersController.cs @@ -65,6 +65,9 @@ namespace Minecraft_Realms_Emulator.Controllers.Admin if (world == null) return BadRequest("World not found"); + world.State = "OPEN"; + _context.SaveChanges(); + new DockerHelper(world).StartServer(); return Ok(true); @@ -77,6 +80,9 @@ namespace Minecraft_Realms_Emulator.Controllers.Admin if (world == null) return BadRequest("World not found"); + world.State = "CLOSED"; + _context.SaveChanges(); + new DockerHelper(world).StopServer(); return Ok(true);