Check if player data is false when kicking all

This commit is contained in:
Vortrex
2023-03-08 22:23:33 -06:00
parent 3b28340c72
commit 6af7339ac7

View File

@@ -207,9 +207,11 @@ function resetClientStuff(client) {
function kickAllClients() { function kickAllClients() {
getClients().forEach((client) => { getClients().forEach((client) => {
getPlayerData(client).customDisconnectReason = "ServerRestarting"; if (getPlayerData(client) != false) {
getPlayerData(client).customDisconnectReason = "ServerRestarting";
}
disconnectPlayer(client); disconnectPlayer(client);
}) });
} }
// =========================================================================== // ===========================================================================