Check if player data is false when kicking all
This commit is contained in:
@@ -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);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user