Bds Maneger Server Modification #248

Merged
Sirherobrine23 merged 8 commits from Socket into main 2021-11-25 00:04:47 +00:00
Showing only changes of commit 16e90b3b3b - Show all commits

View File

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