mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2024-11-21 05:38:21 -05:00
chore: update packages
This commit is contained in:
parent
c1353de565
commit
50042e96ad
@ -14,8 +14,8 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DotNetEnv" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.5" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.5">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.6">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SignalR.Protocol;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Minecraft_Realms_Emulator.Attributes;
|
||||
using Minecraft_Realms_Emulator.Data;
|
||||
@ -667,28 +666,28 @@ namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
|
||||
[CheckActiveSubscription]
|
||||
public async Task<ActionResult<bool>> Open(int wId)
|
||||
{
|
||||
var worlds = await _context.Worlds.ToListAsync();
|
||||
var worlds = await _context.Worlds.ToListAsync();
|
||||
|
||||
var world = worlds.Find(w => w.Id == wId);
|
||||
var world = worlds.Find(w => w.Id == wId);
|
||||
|
||||
new DockerHelper(world).StartServer();
|
||||
new DockerHelper(world).StartServer();
|
||||
|
||||
world.State = nameof(StateEnum.OPEN);
|
||||
world.State = nameof(StateEnum.OPEN);
|
||||
|
||||
_context.SaveChanges();
|
||||
_context.SaveChanges();
|
||||
|
||||
var connection = _context.Connections.FirstOrDefault(c => c.World.Id == wId);
|
||||
var query = new MinecraftServerQuery().Query(connection.Address);
|
||||
var connection = _context.Connections.FirstOrDefault(c => c.World.Id == wId);
|
||||
var query = new MinecraftServerQuery().Query(connection.Address);
|
||||
|
||||
while (query == null)
|
||||
{
|
||||
await Task.Delay(1000);
|
||||
query = new MinecraftServerQuery().Query(connection.Address);
|
||||
}
|
||||
|
||||
return Ok(true);
|
||||
while (query == null)
|
||||
{
|
||||
await Task.Delay(1000);
|
||||
query = new MinecraftServerQuery().Query(connection.Address);
|
||||
}
|
||||
|
||||
return Ok(true);
|
||||
}
|
||||
|
||||
[HttpPut("{wId}/close")]
|
||||
[CheckForWorld]
|
||||
[CheckRealmOwner]
|
||||
|
Loading…
Reference in New Issue
Block a user