mirror of
https://github.com/Xiao-MoMi/Custom-Nameplates.git
synced 2026-01-03 14:12:24 +00:00
Fix thread safety issue
This commit is contained in:
@@ -80,7 +80,7 @@ public class ActionBarSender implements Feature {
|
||||
this.onConditionTimerCheck();
|
||||
}
|
||||
|
||||
public void onConditionTimerCheck() {
|
||||
public synchronized void onConditionTimerCheck() {
|
||||
ActionBarConfig[] configs = manager.actionBarConfigs();
|
||||
outer: {
|
||||
for (ActionBarConfig config : configs) {
|
||||
|
||||
@@ -98,7 +98,7 @@ public class BossBarSender implements Feature, BossBar {
|
||||
timeLeft = 0;
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
public synchronized void tick() {
|
||||
if (timeLeft > 0)
|
||||
timeLeft--;
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ public class TagRendererImpl implements TagRenderer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTick() {
|
||||
public synchronized void onTick() {
|
||||
if (!isValid()) return;
|
||||
|
||||
Set<CNPlayer> playersToUpdatePassengers = new ObjectOpenHashSet<>();
|
||||
|
||||
Reference in New Issue
Block a user