fix player connect

This commit is contained in:
Fantino Davide 2022-08-27 00:30:33 +02:00
parent 8fb5681144
commit 7ae953ff9d

View File

@ -325,13 +325,13 @@ export default class MapVote extends BasePlugin {
if (playerCount < minPlayers && !force) {
if (this.onConnectBound == false) {
this.server.on("PLAYER_CONNECTED", this.beginVoting)
this.server.on("PLAYER_CONNECTED", ()=>{this.beginVoting})
this.onConnectBound = true;
}
return;
}
if (this.onConnectBound) {
this.server.removeEventListener("PLAYER_CONNECTED", this.beginVoting);
this.server.removeEventListener("PLAYER_CONNECTED", ()=>{this.beginVoting});
this.onConnectBound = false;
}