This commit is contained in:
Davide Fantino 2022-09-16 16:29:35 +02:00
parent 0e7fd4a123
commit 2010dffbdf

View File

@ -517,13 +517,14 @@ 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;
}