From 0669c741b97b902bd0ec0046d54c59dd7e7fcfd3 Mon Sep 17 00:00:00 2001 From: CyberL1 Date: Thu, 30 May 2024 11:01:42 +0200 Subject: [PATCH] feat: send closed message if the server is closed --- .../Controllers/Admin/ServersController.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Minecraft-Realms-Emulator/Controllers/Admin/ServersController.cs b/Minecraft-Realms-Emulator/Controllers/Admin/ServersController.cs index 4da404d..79d3145 100644 --- a/Minecraft-Realms-Emulator/Controllers/Admin/ServersController.cs +++ b/Minecraft-Realms-Emulator/Controllers/Admin/ServersController.cs @@ -2,6 +2,7 @@ using Minecraft_Realms_Emulator.Attributes; using Minecraft_Realms_Emulator.Data; using Minecraft_Realms_Emulator.Entities; +using Minecraft_Realms_Emulator.Enums; using Minecraft_Realms_Emulator.Modes.Realms.Helpers; namespace Minecraft_Realms_Emulator.Controllers.Admin @@ -55,6 +56,7 @@ namespace Minecraft_Realms_Emulator.Controllers.Admin await HttpContext.Response.Body.FlushAsync(); }); + if (world.State == nameof(StateEnum.CLOSED)) await HttpContext.Response.WriteAsync("data: closed\n\n"); return new EmptyResult(); }