Bds Maneger Server Modification #248
@@ -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 {};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user