mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-23 23:03:51 -06:00
fix player connect
This commit is contained in:
parent
8fb5681144
commit
7ae953ff9d
@ -325,13 +325,13 @@ export default class MapVote extends BasePlugin {
|
|||||||
|
|
||||||
if (playerCount < minPlayers && !force) {
|
if (playerCount < minPlayers && !force) {
|
||||||
if (this.onConnectBound == false) {
|
if (this.onConnectBound == false) {
|
||||||
this.server.on("PLAYER_CONNECTED", this.beginVoting)
|
this.server.on("PLAYER_CONNECTED", ()=>{this.beginVoting})
|
||||||
this.onConnectBound = true;
|
this.onConnectBound = true;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.onConnectBound) {
|
if (this.onConnectBound) {
|
||||||
this.server.removeEventListener("PLAYER_CONNECTED", this.beginVoting);
|
this.server.removeEventListener("PLAYER_CONNECTED", ()=>{this.beginVoting});
|
||||||
this.onConnectBound = false;
|
this.onConnectBound = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user