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