diff --git a/Minecraft-Realms-Emulator/Controllers/WorldsController.cs b/Minecraft-Realms-Emulator/Controllers/WorldsController.cs index e9095c4..6b749b4 100644 --- a/Minecraft-Realms-Emulator/Controllers/WorldsController.cs +++ b/Minecraft-Realms-Emulator/Controllers/WorldsController.cs @@ -297,5 +297,18 @@ namespace Minecraft_Realms_Emulator.Controllers return Ok(connection); } + + [HttpDelete("{wId}")] + public ActionResult DeleteRealm(int wId) + { + var world = _context.Worlds.Find(wId); + + if (world == null) return NotFound("World not found"); + + _context.Worlds.Remove(world); + _context.SaveChanges(); + + return Ok(true); + } } }