You've already forked KF-MMO-Server
Updated inventory management. Improved saving.
This commit is contained in:
@@ -21,10 +21,7 @@ export class players{
|
||||
}
|
||||
|
||||
static savePlayers(){
|
||||
game.playersDB.forEach(player => {
|
||||
let data = JSON.stringify(player, null, 2);
|
||||
fs.writeFileSync(`Database/Players/${player.id}.json`, data);
|
||||
});
|
||||
game.playersDB.forEach(player => {player.save(fs)});
|
||||
}
|
||||
|
||||
static loadPlayers(){
|
||||
|
||||
Reference in New Issue
Block a user