Skip to content

Commit

Permalink
moved downstreamScoreboard#clear out of the task
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdev03 committed Jul 27, 2024
1 parent 4fdae01 commit fdff6a2
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ public ChannelInjection(@NotNull Player player, @NotNull VelocityScoreboardAPI p
public void write(ChannelHandlerContext context, Object packet, ChannelPromise channelPromise) throws Exception {
super.write(context, packet, channelPromise);
if (packet instanceof JoinGamePacket) {
plugin.getServer().getScheduler().buildTask(plugin, () -> {
downstreamScoreboard.clear();
proxyScoreboard.resend();
}).schedule();
downstreamScoreboard.clear();
plugin.getServer().getScheduler().buildTask(plugin, proxyScoreboard::resend).schedule();
}
}

Expand Down

0 comments on commit fdff6a2

Please sign in to comment.