fix: uninitialized worlds

This commit is contained in:
CyberL1 2024-12-14 13:52:45 +01:00
parent b0ed4a50de
commit 27a5d20888
2 changed files with 12 additions and 12 deletions

View File

@ -73,8 +73,8 @@ namespace Minecraft_Realms_Emulator.Modes.External
OwnerUUID = world.OwnerUUID, OwnerUUID = world.OwnerUUID,
Name = world.Name, Name = world.Name,
Motd = world.Motd, Motd = world.Motd,
GameMode = activeSlot.GameMode, GameMode = activeSlot?.GameMode ?? 0,
IsHardcore = activeSlot.Difficulty == 3, IsHardcore = activeSlot?.Difficulty == 3,
State = world.State, State = world.State,
WorldType = world.WorldType, WorldType = world.WorldType,
MaxPlayers = world.MaxPlayers, MaxPlayers = world.MaxPlayers,
@ -177,8 +177,8 @@ namespace Minecraft_Realms_Emulator.Modes.External
OwnerUUID = world.OwnerUUID, OwnerUUID = world.OwnerUUID,
Name = world.Name, Name = world.Name,
Motd = world.Motd, Motd = world.Motd,
GameMode = activeSlot.GameMode, GameMode = activeSlot?.GameMode ?? 0,
IsHardcore = activeSlot.Difficulty == 3, IsHardcore = activeSlot?.Difficulty == 3,
State = world.State, State = world.State,
WorldType = world.WorldType, WorldType = world.WorldType,
MaxPlayers = world.MaxPlayers, MaxPlayers = world.MaxPlayers,
@ -333,8 +333,8 @@ namespace Minecraft_Realms_Emulator.Modes.External
OwnerUUID = world.OwnerUUID, OwnerUUID = world.OwnerUUID,
Name = world.Name, Name = world.Name,
Motd = world.Motd, Motd = world.Motd,
GameMode = activeSlot.GameMode, GameMode = activeSlot?.GameMode ?? 0,
IsHardcore = activeSlot.Difficulty == 3, IsHardcore = activeSlot?.Difficulty == 3,
State = world.State, State = world.State,
WorldType = world.WorldType, WorldType = world.WorldType,
MaxPlayers = world.MaxPlayers, MaxPlayers = world.MaxPlayers,

View File

@ -76,8 +76,8 @@ namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
OwnerUUID = world.OwnerUUID, OwnerUUID = world.OwnerUUID,
Name = world.Name, Name = world.Name,
Motd = world.Motd, Motd = world.Motd,
GameMode = activeSlot.GameMode, GameMode = activeSlot?.GameMode ?? 0,
IsHardcore = activeSlot.Difficulty == 3, IsHardcore = activeSlot?.Difficulty == 3,
State = world.State, State = world.State,
WorldType = world.WorldType, WorldType = world.WorldType,
MaxPlayers = world.MaxPlayers, MaxPlayers = world.MaxPlayers,
@ -180,8 +180,8 @@ namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
OwnerUUID = world.OwnerUUID, OwnerUUID = world.OwnerUUID,
Name = world.Name, Name = world.Name,
Motd = world.Motd, Motd = world.Motd,
GameMode = activeSlot.GameMode, GameMode = activeSlot?.GameMode ?? 0,
IsHardcore = activeSlot.Difficulty == 3, IsHardcore = activeSlot?.Difficulty == 3,
State = world.State, State = world.State,
WorldType = world.WorldType, WorldType = world.WorldType,
MaxPlayers = world.MaxPlayers, MaxPlayers = world.MaxPlayers,
@ -336,8 +336,8 @@ namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
OwnerUUID = world.OwnerUUID, OwnerUUID = world.OwnerUUID,
Name = world.Name, Name = world.Name,
Motd = world.Motd, Motd = world.Motd,
GameMode = activeSlot.GameMode, GameMode = activeSlot?.GameMode ?? 0,
IsHardcore = activeSlot.Difficulty == 3, IsHardcore = activeSlot?.Difficulty == 3,
State = world.State, State = world.State,
WorldType = world.WorldType, WorldType = world.WorldType,
MaxPlayers = world.MaxPlayers, MaxPlayers = world.MaxPlayers,