fix: removing players from world

This commit is contained in:
CyberL1 2024-02-23 12:47:17 +01:00
parent 2b1c55d030
commit 226a85e054

View File

@ -145,9 +145,9 @@ namespace Minecraft_Realms_Emulator.Controllers
var players = world.Players.ToList();
var playerIndex = world.Players.FindIndex(p => p.Uuid == uuid);
var player = _context.Players.Where(p => p.World.Id == wId).FirstOrDefault(p => p.Uuid == uuid);
world.Players.RemoveAt(playerIndex);
_context.Players.Remove(player);
var invite = await _context.Invites.FirstOrDefaultAsync(i => i.RecipeintUUID == uuid);