mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2024-11-22 06:08:22 -05:00
feat: default server address
This commit is contained in:
parent
fe6a66601d
commit
89025e31b2
@ -102,7 +102,7 @@ namespace Minecraft_Realms_Emulator.Controllers
|
|||||||
var connection = new Connection
|
var connection = new Connection
|
||||||
{
|
{
|
||||||
World = world,
|
World = world,
|
||||||
Address = "127.0.0.1"
|
Address = _context.Configuration.FirstOrDefault(x => x.Key == "defaultServerAddress").Value
|
||||||
};
|
};
|
||||||
|
|
||||||
_context.Worlds.Update(world);
|
_context.Worlds.Update(world);
|
||||||
|
@ -22,9 +22,20 @@ namespace Minecraft_Realms_Emulator.Helpers
|
|||||||
};
|
};
|
||||||
|
|
||||||
db.Configuration.Add(newsLink);
|
db.Configuration.Add(newsLink);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (db.Configuration.FirstOrDefault(s => s.Key == "defaultServerAddress") == null)
|
||||||
|
{
|
||||||
|
var defaultServerAddress = new Configuration
|
||||||
|
{
|
||||||
|
Key = "defaultServerAddress",
|
||||||
|
Value = "127.0.0.1"
|
||||||
|
};
|
||||||
|
|
||||||
|
db.Configuration.Add(defaultServerAddress);
|
||||||
|
}
|
||||||
|
|
||||||
db.SaveChanges();
|
db.SaveChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user