mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2025-04-02 14:08:36 -04:00
Compare commits
3 Commits
54a05537c4
...
b0ed4a50de
Author | SHA1 | Date | |
---|---|---|---|
b0ed4a50de | |||
8c72940c23 | |||
4605ac5fef |
@ -7,6 +7,7 @@ using Minecraft_Realms_Emulator.Shared.Data;
|
|||||||
using Minecraft_Realms_Emulator.Shared.Entities;
|
using Minecraft_Realms_Emulator.Shared.Entities;
|
||||||
using Minecraft_Realms_Emulator.Shared.Requests;
|
using Minecraft_Realms_Emulator.Shared.Requests;
|
||||||
using Minecraft_Realms_Emulator.Shared.Responses;
|
using Minecraft_Realms_Emulator.Shared.Responses;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Minecraft_Realms_Emulator.Modes.External
|
namespace Minecraft_Realms_Emulator.Modes.External
|
||||||
{
|
{
|
||||||
@ -73,7 +74,7 @@ namespace Minecraft_Realms_Emulator.Modes.External
|
|||||||
Name = world.Name,
|
Name = world.Name,
|
||||||
Motd = world.Motd,
|
Motd = world.Motd,
|
||||||
GameMode = activeSlot.GameMode,
|
GameMode = activeSlot.GameMode,
|
||||||
Hardcore = 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,
|
||||||
@ -116,7 +117,7 @@ namespace Minecraft_Realms_Emulator.Modes.External
|
|||||||
Name = world.Name,
|
Name = world.Name,
|
||||||
Motd = world.Motd,
|
Motd = world.Motd,
|
||||||
GameMode = activeSlot.GameMode,
|
GameMode = activeSlot.GameMode,
|
||||||
Hardcore = 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,
|
||||||
@ -157,8 +158,8 @@ namespace Minecraft_Realms_Emulator.Modes.External
|
|||||||
string playerName = cookie.Split(";")[1].Split("=")[1];
|
string playerName = cookie.Split(";")[1].Split("=")[1];
|
||||||
string gameVersion = cookie.Split(";")[2].Split("=")[1];
|
string gameVersion = cookie.Split(";")[2].Split("=")[1];
|
||||||
|
|
||||||
var ownedWorlds = await _context.Worlds.Where(w => w.OwnerUUID == playerUUID || w.ParentWorld.OwnerUUID == playerUUID).Include(w => w.Subscription).Include(w => w.Slots).Include(w => w.ParentWorld).ToListAsync();
|
var ownedWorlds = await _context.Worlds.Where(w => w.OwnerUUID == playerUUID || w.ParentWorld.OwnerUUID == playerUUID).Include(w => w.Subscription).Include(w => w.Slots).Include(w => w.Minigame).Include(w => w.ParentWorld).ToListAsync();
|
||||||
var memberWorlds = await _context.Players.Where(p => p.Uuid == playerUUID && p.Accepted).Include(p => p.World.Subscription).Include(p => p.World.Slots).Include(p => p.World.ParentWorld).Select(p => p.World).ToListAsync();
|
var memberWorlds = await _context.Players.Where(p => p.Uuid == playerUUID && p.Accepted).Include(p => p.World.Subscription).Include(p => p.World.Slots).Include(p => p.World.ParentWorld).Include(p => p.World.Minigame).Select(p => p.World).ToListAsync();
|
||||||
|
|
||||||
List<WorldResponse> allWorlds = [];
|
List<WorldResponse> allWorlds = [];
|
||||||
|
|
||||||
@ -177,7 +178,7 @@ namespace Minecraft_Realms_Emulator.Modes.External
|
|||||||
Name = world.Name,
|
Name = world.Name,
|
||||||
Motd = world.Motd,
|
Motd = world.Motd,
|
||||||
GameMode = activeSlot.GameMode,
|
GameMode = activeSlot.GameMode,
|
||||||
Hardcore = 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,
|
||||||
@ -233,7 +234,7 @@ namespace Minecraft_Realms_Emulator.Modes.External
|
|||||||
Name = world.Name,
|
Name = world.Name,
|
||||||
Motd = world.Motd,
|
Motd = world.Motd,
|
||||||
GameMode = activeSlot.GameMode,
|
GameMode = activeSlot.GameMode,
|
||||||
Hardcore = 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,
|
||||||
@ -287,8 +288,8 @@ namespace Minecraft_Realms_Emulator.Modes.External
|
|||||||
string playerName = cookie.Split(";")[1].Split("=")[1];
|
string playerName = cookie.Split(";")[1].Split("=")[1];
|
||||||
string gameVersion = cookie.Split(";")[2].Split("=")[1];
|
string gameVersion = cookie.Split(";")[2].Split("=")[1];
|
||||||
|
|
||||||
var ownedWorlds = await _context.Worlds.Where(w => w.ParentWorld != null && w.ParentWorld.OwnerUUID == playerUUID).Include(w => w.Subscription).Include(w => w.Slots).Include(w => w.ParentWorld).ToListAsync();
|
var ownedWorlds = await _context.Worlds.Where(w => w.ParentWorld != null && w.ParentWorld.OwnerUUID == playerUUID).Include(w => w.Subscription).Include(w => w.Slots).Include(w => w.ParentWorld).Include(w => w.Minigame).ToListAsync();
|
||||||
var memberWorlds = await _context.Players.Where(p => p.World.ParentWorld != null && p.Uuid == playerUUID && p.Accepted).Include(p => p.World.Subscription).Include(p => p.World.Slots).Include(p => p.World.ParentWorld).Select(p => p.World).ToListAsync();
|
var memberWorlds = await _context.Players.Where(p => p.World.ParentWorld != null && p.Uuid == playerUUID && p.Accepted).Include(p => p.World.Subscription).Include(p => p.World.Slots).Include(p => p.World.ParentWorld).Include(p => p.World.Minigame).Select(p => p.World).ToListAsync();
|
||||||
|
|
||||||
List<WorldResponse> allWorlds = [];
|
List<WorldResponse> allWorlds = [];
|
||||||
|
|
||||||
@ -333,7 +334,7 @@ namespace Minecraft_Realms_Emulator.Modes.External
|
|||||||
Name = world.Name,
|
Name = world.Name,
|
||||||
Motd = world.Motd,
|
Motd = world.Motd,
|
||||||
GameMode = activeSlot.GameMode,
|
GameMode = activeSlot.GameMode,
|
||||||
Hardcore = 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,
|
||||||
@ -378,7 +379,7 @@ namespace Minecraft_Realms_Emulator.Modes.External
|
|||||||
Name = world.Name,
|
Name = world.Name,
|
||||||
Motd = world.Motd,
|
Motd = world.Motd,
|
||||||
GameMode = activeSlot.GameMode,
|
GameMode = activeSlot.GameMode,
|
||||||
Hardcore = 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,
|
||||||
@ -418,7 +419,7 @@ namespace Minecraft_Realms_Emulator.Modes.External
|
|||||||
string cookie = Request.Headers.Cookie;
|
string cookie = Request.Headers.Cookie;
|
||||||
string gameVersion = cookie.Split(";")[2].Split("=")[1];
|
string gameVersion = cookie.Split(";")[2].Split("=")[1];
|
||||||
|
|
||||||
var world = await _context.Worlds.Include(w => w.Players).Include(w => w.Subscription).Include(w => w.Slots).Include(w => w.ParentWorld.Subscription).FirstOrDefaultAsync(w => w.Id == wId);
|
var world = await _context.Worlds.Include(w => w.Players).Include(w => w.Subscription).Include(w => w.Slots).Include(w => w.ParentWorld.Subscription).Include(w => w.Minigame).FirstOrDefaultAsync(w => w.Id == wId);
|
||||||
|
|
||||||
if (world.State == nameof(StateEnum.UNINITIALIZED))
|
if (world.State == nameof(StateEnum.UNINITIALIZED))
|
||||||
{
|
{
|
||||||
@ -443,26 +444,26 @@ namespace Minecraft_Realms_Emulator.Modes.External
|
|||||||
slots.Add(new SlotResponse()
|
slots.Add(new SlotResponse()
|
||||||
{
|
{
|
||||||
SlotId = slot.SlotId,
|
SlotId = slot.SlotId,
|
||||||
Options =
|
Options = JsonConvert.SerializeObject(new
|
||||||
{
|
{
|
||||||
SlotName = slot.SlotName,
|
slotName = slot.SlotName,
|
||||||
GameMode = slot.GameMode,
|
gameMode = slot.GameMode,
|
||||||
Hardcore = slot.GameMode == 3,
|
hardcore = slot.Difficulty == 3,
|
||||||
Difficulty = slot.Difficulty,
|
difficulty = slot.Difficulty,
|
||||||
SpawnProtection = slot.SpawnProtection,
|
spawnProection = slot.SpawnProtection,
|
||||||
ForceGameMode = slot.ForceGameMode,
|
forceGameMode = slot.ForceGameMode,
|
||||||
Pvp = slot.Pvp,
|
pvp = slot.Pvp,
|
||||||
SpawnAnimals = slot.SpawnAnimals,
|
spawnAnimals = slot.SpawnAnimals,
|
||||||
SpawnMonsters = slot.SpawnMonsters,
|
spawnMonsters = slot.SpawnMonsters,
|
||||||
SpawnNPCs = slot.SpawnNPCs,
|
spawnNPCs = slot.SpawnNPCs,
|
||||||
CommandBlocks = slot.CommandBlocks,
|
commandBlocks = slot.CommandBlocks,
|
||||||
Version = slot.Version,
|
version = slot.Version,
|
||||||
Compatibility = compatibility
|
compatibility
|
||||||
}
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
SlotOptionsResponse activeSlotOptions = slots.Find(s => s.SlotId == activeSlot.SlotId).Options;
|
var activeSlotOptions = JsonConvert.DeserializeObject<SlotOptionsResponse>(slots.Find(s => s.SlotId == activeSlot.SlotId).Options);
|
||||||
|
|
||||||
if (world.ParentWorld != null)
|
if (world.ParentWorld != null)
|
||||||
{
|
{
|
||||||
@ -477,7 +478,7 @@ namespace Minecraft_Realms_Emulator.Modes.External
|
|||||||
Name = world.Name,
|
Name = world.Name,
|
||||||
Motd = world.Motd,
|
Motd = world.Motd,
|
||||||
GameMode = activeSlot.GameMode,
|
GameMode = activeSlot.GameMode,
|
||||||
Hardcore = activeSlot.GameMode == 3,
|
IsHardcore = activeSlot.GameMode == 3,
|
||||||
State = world.State,
|
State = world.State,
|
||||||
WorldType = world.WorldType,
|
WorldType = world.WorldType,
|
||||||
MaxPlayers = world.MaxPlayers,
|
MaxPlayers = world.MaxPlayers,
|
||||||
@ -720,7 +721,7 @@ namespace Minecraft_Realms_Emulator.Modes.External
|
|||||||
slot.CommandBlocks = body.CommandBlocks;
|
slot.CommandBlocks = body.CommandBlocks;
|
||||||
|
|
||||||
_context.SaveChanges();
|
_context.SaveChanges();
|
||||||
|
|
||||||
return Ok(true);
|
return Ok(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -853,7 +854,7 @@ namespace Minecraft_Realms_Emulator.Modes.External
|
|||||||
var totalTemplates = _context.Templates.Where(t => t.Type == type).Count();
|
var totalTemplates = _context.Templates.Where(t => t.Type == type).Count();
|
||||||
var templates = _context.Templates.Where(t => t.Type == type).Skip((page - 1) * pageSize).Take(pageSize).ToList();
|
var templates = _context.Templates.Where(t => t.Type == type).Skip((page - 1) * pageSize).Take(pageSize).ToList();
|
||||||
|
|
||||||
TemplatesResponse templatesResponse = new()
|
TemplatesResponse templatesResponse = new()
|
||||||
{
|
{
|
||||||
Page = page,
|
Page = page,
|
||||||
Size = pageSize,
|
Size = pageSize,
|
||||||
|
@ -10,6 +10,7 @@ using Minecraft_Realms_Emulator.Shared.Requests;
|
|||||||
using Minecraft_Realms_Emulator.Shared.Responses;
|
using Minecraft_Realms_Emulator.Shared.Responses;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
|
namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
|
||||||
{
|
{
|
||||||
@ -76,7 +77,7 @@ namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
|
|||||||
Name = world.Name,
|
Name = world.Name,
|
||||||
Motd = world.Motd,
|
Motd = world.Motd,
|
||||||
GameMode = activeSlot.GameMode,
|
GameMode = activeSlot.GameMode,
|
||||||
Hardcore = 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,
|
||||||
@ -119,7 +120,7 @@ namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
|
|||||||
Name = world.Name,
|
Name = world.Name,
|
||||||
Motd = world.Motd,
|
Motd = world.Motd,
|
||||||
GameMode = activeSlot.GameMode,
|
GameMode = activeSlot.GameMode,
|
||||||
Hardcore = 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,
|
||||||
@ -160,8 +161,8 @@ namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
|
|||||||
string playerName = cookie.Split(";")[1].Split("=")[1];
|
string playerName = cookie.Split(";")[1].Split("=")[1];
|
||||||
string gameVersion = cookie.Split(";")[2].Split("=")[1];
|
string gameVersion = cookie.Split(";")[2].Split("=")[1];
|
||||||
|
|
||||||
var ownedWorlds = await _context.Worlds.Where(w => w.OwnerUUID == playerUUID || w.ParentWorld.OwnerUUID == playerUUID).Include(w => w.Subscription).Include(w => w.Slots).Include(w => w.ParentWorld).ToListAsync();
|
var ownedWorlds = await _context.Worlds.Where(w => w.OwnerUUID == playerUUID || w.ParentWorld.OwnerUUID == playerUUID).Include(w => w.Subscription).Include(w => w.Slots).Include(w => w.Minigame).Include(w => w.ParentWorld).ToListAsync();
|
||||||
var memberWorlds = await _context.Players.Where(p => p.Uuid == playerUUID && p.Accepted).Include(p => p.World.Subscription).Include(p => p.World.Slots).Include(p => p.World.ParentWorld).Select(p => p.World).ToListAsync();
|
var memberWorlds = await _context.Players.Where(p => p.Uuid == playerUUID && p.Accepted).Include(p => p.World.Subscription).Include(p => p.World.Slots).Include(p => p.World.ParentWorld).Include(p => p.World.Minigame).Select(p => p.World).ToListAsync();
|
||||||
|
|
||||||
List<WorldResponse> allWorlds = [];
|
List<WorldResponse> allWorlds = [];
|
||||||
|
|
||||||
@ -180,7 +181,7 @@ namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
|
|||||||
Name = world.Name,
|
Name = world.Name,
|
||||||
Motd = world.Motd,
|
Motd = world.Motd,
|
||||||
GameMode = activeSlot.GameMode,
|
GameMode = activeSlot.GameMode,
|
||||||
Hardcore = 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,
|
||||||
@ -236,7 +237,7 @@ namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
|
|||||||
Name = world.Name,
|
Name = world.Name,
|
||||||
Motd = world.Motd,
|
Motd = world.Motd,
|
||||||
GameMode = activeSlot.GameMode,
|
GameMode = activeSlot.GameMode,
|
||||||
Hardcore = 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,
|
||||||
@ -290,8 +291,8 @@ namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
|
|||||||
string playerName = cookie.Split(";")[1].Split("=")[1];
|
string playerName = cookie.Split(";")[1].Split("=")[1];
|
||||||
string gameVersion = cookie.Split(";")[2].Split("=")[1];
|
string gameVersion = cookie.Split(";")[2].Split("=")[1];
|
||||||
|
|
||||||
var ownedWorlds = await _context.Worlds.Where(w => w.ParentWorld != null && w.ParentWorld.OwnerUUID == playerUUID).Include(w => w.Subscription).Include(w => w.Slots).Include(w => w.ParentWorld).ToListAsync();
|
var ownedWorlds = await _context.Worlds.Where(w => w.ParentWorld != null && w.ParentWorld.OwnerUUID == playerUUID).Include(w => w.Subscription).Include(w => w.Slots).Include(w => w.ParentWorld).Include(w => w.Minigame).ToListAsync();
|
||||||
var memberWorlds = await _context.Players.Where(p => p.World.ParentWorld != null && p.Uuid == playerUUID && p.Accepted).Include(p => p.World.Subscription).Include(p => p.World.Slots).Include(p => p.World.ParentWorld).Select(p => p.World).ToListAsync();
|
var memberWorlds = await _context.Players.Where(p => p.World.ParentWorld != null && p.Uuid == playerUUID && p.Accepted).Include(p => p.World.Subscription).Include(p => p.World.Slots).Include(p => p.World.ParentWorld).Include(p => p.World.Minigame).Select(p => p.World).ToListAsync();
|
||||||
|
|
||||||
List<WorldResponse> allWorlds = [];
|
List<WorldResponse> allWorlds = [];
|
||||||
|
|
||||||
@ -336,7 +337,7 @@ namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
|
|||||||
Name = world.Name,
|
Name = world.Name,
|
||||||
Motd = world.Motd,
|
Motd = world.Motd,
|
||||||
GameMode = activeSlot.GameMode,
|
GameMode = activeSlot.GameMode,
|
||||||
Hardcore = 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,
|
||||||
@ -381,7 +382,7 @@ namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
|
|||||||
Name = world.Name,
|
Name = world.Name,
|
||||||
Motd = world.Motd,
|
Motd = world.Motd,
|
||||||
GameMode = activeSlot.GameMode,
|
GameMode = activeSlot.GameMode,
|
||||||
Hardcore = 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,
|
||||||
@ -446,26 +447,26 @@ namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
|
|||||||
slots.Add(new SlotResponse()
|
slots.Add(new SlotResponse()
|
||||||
{
|
{
|
||||||
SlotId = slot.SlotId,
|
SlotId = slot.SlotId,
|
||||||
Options =
|
Options = JsonConvert.SerializeObject(new
|
||||||
{
|
{
|
||||||
SlotName = slot.SlotName,
|
slotName = slot.SlotName,
|
||||||
GameMode = slot.GameMode,
|
gameMode = slot.GameMode,
|
||||||
Hardcore = slot.Difficulty == 3,
|
hardcore = slot.Difficulty == 3,
|
||||||
Difficulty = slot.Difficulty,
|
difficulty = slot.Difficulty,
|
||||||
SpawnProtection = slot.SpawnProtection,
|
spawnProection = slot.SpawnProtection,
|
||||||
ForceGameMode = slot.ForceGameMode,
|
forceGameMode = slot.ForceGameMode,
|
||||||
Pvp = slot.Pvp,
|
pvp = slot.Pvp,
|
||||||
SpawnAnimals = slot.SpawnAnimals,
|
spawnAnimals = slot.SpawnAnimals,
|
||||||
SpawnMonsters = slot.SpawnMonsters,
|
spawnMonsters = slot.SpawnMonsters,
|
||||||
SpawnNPCs = slot.SpawnNPCs,
|
spawnNPCs = slot.SpawnNPCs,
|
||||||
CommandBlocks = slot.CommandBlocks,
|
commandBlocks = slot.CommandBlocks,
|
||||||
Version = slot.Version,
|
version = slot.Version,
|
||||||
Compatibility = compatibility
|
compatibility
|
||||||
}
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
SlotOptionsResponse activeSlotOptions = slots.Find(s => s.SlotId == activeSlot.SlotId).Options;
|
var activeSlotOptions = JsonConvert.DeserializeObject<SlotOptionsResponse>(slots.Find(s => s.SlotId == activeSlot.SlotId).Options);
|
||||||
|
|
||||||
if (world.ParentWorld != null)
|
if (world.ParentWorld != null)
|
||||||
{
|
{
|
||||||
@ -480,7 +481,7 @@ namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
|
|||||||
Name = world.Name,
|
Name = world.Name,
|
||||||
Motd = world.Motd,
|
Motd = world.Motd,
|
||||||
GameMode = activeSlot.GameMode,
|
GameMode = activeSlot.GameMode,
|
||||||
Hardcore = 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,
|
||||||
|
@ -3,11 +3,12 @@
|
|||||||
public class SlotResponse
|
public class SlotResponse
|
||||||
{
|
{
|
||||||
public int SlotId { get; set; }
|
public int SlotId { get; set; }
|
||||||
public SlotOptionsResponse Options { get; set; } = null!;
|
public SlotSettingsResponse Settings { get; set; } = null!;
|
||||||
|
public string Options { get; set; } = null!;
|
||||||
|
|
||||||
public SlotResponse()
|
public SlotResponse()
|
||||||
{
|
{
|
||||||
Options = new SlotOptionsResponse();
|
Settings = new SlotSettingsResponse();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
namespace Minecraft_Realms_Emulator.Shared.Responses
|
||||||
|
{
|
||||||
|
public class SlotSettingsResponse
|
||||||
|
{
|
||||||
|
public bool Hardcore { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -5,11 +5,12 @@ namespace Minecraft_Realms_Emulator.Shared.Responses
|
|||||||
public class WorldResponse : World
|
public class WorldResponse : World
|
||||||
{
|
{
|
||||||
public string RemoteSubscriptionId { get; set; } = new Guid().ToString();
|
public string RemoteSubscriptionId { get; set; } = new Guid().ToString();
|
||||||
public bool Hardcore { get; set; }
|
public bool IsHardcore { get; set; } = false;
|
||||||
public int GameMode { get; set; }
|
public int GameMode { get; set; }
|
||||||
public int DaysLeft { get; set; } = 30;
|
public int DaysLeft { get; set; } = 30;
|
||||||
public bool Expired { get; set; } = false;
|
public bool Expired { get; set; } = false;
|
||||||
public bool ExpiredTrial { get; set; } = false;
|
public bool ExpiredTrial { get; set; } = false;
|
||||||
|
public bool GracePeriod { get; set; } = false;
|
||||||
public string Compatibility { get; set; } = null!;
|
public string Compatibility { get; set; } = null!;
|
||||||
public List<SlotResponse> Slots { get; set; } = null!;
|
public List<SlotResponse> Slots { get; set; } = null!;
|
||||||
public string ActiveVersion { get; set; } = null!;
|
public string ActiveVersion { get; set; } = null!;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user