Bds Maneger Server Modification #248

Merged
Sirherobrine23 merged 8 commits from Socket into main 2021-11-25 00:04:47 +00:00
5 changed files with 1422 additions and 1439 deletions
Showing only changes of commit 16e90b3b3b - Show all commits

View File

@ -68,14 +68,9 @@ function UpdateUserJSON(New_Object = []){
];
Players_Json = [];
if (fs.existsSync(Player_Json_path)) Players_Json = JSON.parse(fs.readFileSync(Player_Json_path, "utf8"));
if (Players_Json.version === undefined) {
Players_Json.version = 2;
let OldPlayers_Json = {
bedrock: [],
java: [],
pocketmine: [],
jsprismarine: [],
}
if (typeof Players_Json.map !== "function") {
let OldPlayers_Json = Players_Json;
Players_Json = [];
OldPlayers_Json.bedrock.forEach(a=>Players_Json.push({
Player: a.Player,
Action: a.Action,
@ -111,4 +106,4 @@ module.exports.Player_Search = function Player_Search(player = "dontSteve") {
if (Player.Player === player.trim()) return Player;
}
return {};
}
}