mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-23 18:23:52 -06:00
reduced AdminSetNextLayer calls
This commit is contained in:
parent
65a10a92d6
commit
2c0a048e25
@ -385,7 +385,9 @@ export default class MapVote extends DiscordBasePlugin {
|
||||
}
|
||||
if (!skipSetNextMap) {
|
||||
const nextMap = randomElement(cpyWinners);
|
||||
this.server.rcon.execute(`AdminSetNextLayer ${nextMap}`);
|
||||
const baseDataExist = this && this.options && this.server && this.server.players && this.server.nextLayer && this.server.nextLayer.layerid;
|
||||
if (!baseDataExist || this.server.nextLayer.layerid != nextMap)
|
||||
this.server.rcon.execute(`AdminSetNextLayer ${nextMap}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user