mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2024-11-09 16:08:21 -05:00
feat: assign address to world on creation
This commit is contained in:
parent
db64404c92
commit
ca57e03ee3
@ -92,12 +92,20 @@ namespace Minecraft_Realms_Emulator.Controllers
|
|||||||
var subscription = new Subscription
|
var subscription = new Subscription
|
||||||
{
|
{
|
||||||
World = world,
|
World = world,
|
||||||
StartDate = ((DateTimeOffset) DateTime.Now).ToUnixTimeMilliseconds().ToString(),
|
StartDate = ((DateTimeOffset)DateTime.Now).ToUnixTimeMilliseconds().ToString(),
|
||||||
SubscriptionType = SubscriptionType.NORMAL.ToString()
|
SubscriptionType = SubscriptionType.NORMAL.ToString()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var connection = new Connection
|
||||||
|
{
|
||||||
|
World = world,
|
||||||
|
Address = "127.0.0.1"
|
||||||
|
};
|
||||||
|
|
||||||
_context.Worlds.Update(world);
|
_context.Worlds.Update(world);
|
||||||
|
|
||||||
_context.Subscriptions.Add(subscription);
|
_context.Subscriptions.Add(subscription);
|
||||||
|
_context.Connections.Add(connection);
|
||||||
|
|
||||||
_context.SaveChanges();
|
_context.SaveChanges();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user