@zardoy/flying-squid 0.0.79 → 0.0.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -98,11 +98,9 @@ const server = function (serv, options) {
|
|
|
98
98
|
const uuids = Array.from(dirtyStores.values());
|
|
99
99
|
await Promise.all(uuids.map((uuid) => serv.savePlayerDataToDisk(uuid)));
|
|
100
100
|
};
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}, 30_000);
|
|
105
|
-
serv.cleanupFunctions.push(() => clearInterval(interval));
|
|
101
|
+
serv.cleanupFunctions.push(() => {
|
|
102
|
+
serv.saveAllPlayerDataToDisk();
|
|
103
|
+
});
|
|
106
104
|
};
|
|
107
105
|
exports.server = server;
|
|
108
106
|
const player = function (player, serv, options) {
|
|
@@ -120,6 +118,7 @@ const player = function (player, serv, options) {
|
|
|
120
118
|
if (!player.db.meta.firstLoginMs)
|
|
121
119
|
player.db.meta.firstLoginMs = now;
|
|
122
120
|
player.db.meta.lastLoginMs = now;
|
|
121
|
+
player.db.meta.username = player.username;
|
|
123
122
|
await serv.savePlayerDataToDisk(player.uuid);
|
|
124
123
|
});
|
|
125
124
|
// Count placed blocks attempts
|