From 7ae953ff9d70cb8658acc5fa1ae0e19e7ba9050e Mon Sep 17 00:00:00 2001 From: Fantino Davide Date: Sat, 27 Aug 2022 00:30:33 +0200 Subject: [PATCH] fix player connect --- mapvote.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mapvote.js b/mapvote.js index 31208df..a39074a 100644 --- a/mapvote.js +++ b/mapvote.js @@ -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; }