From 2010dffbdf3bb4f97fe3c7b3a623800c5ca80563 Mon Sep 17 00:00:00 2001 From: Davide Fantino <80767709+fantinodavide@users.noreply.github.com> Date: Fri, 16 Sep 2022 16:29:35 +0200 Subject: [PATCH] hotfix --- mapvote.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mapvote.js b/mapvote.js index 39a3c37..a966786 100644 --- a/mapvote.js +++ b/mapvote.js @@ -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; }