Skip to content

Commit 643023d

Browse files
authored
Fixed deleted scoreboards not being removed from ScoreBoard.positions (#3306)
1 parent aa99daa commit 643023d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/plugins/scoreboard.js

+8
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ function inject (bot) {
1616
if (packet.action === 1) {
1717
bot.emit('scoreboardDeleted', scoreboards[packet.name])
1818
delete scoreboards[packet.name]
19+
20+
for (const position in ScoreBoard.positions) {
21+
const scoreboard = ScoreBoard.positions[position]
22+
if (scoreboard.name === packet.name) {
23+
delete ScoreBoard.positions[position]
24+
break
25+
}
26+
}
1927
}
2028

2129
if (packet.action === 2) {

0 commit comments

Comments
 (0)