This commit is contained in:
YuTian 2024-07-23 21:42:02 +08:00
parent 1e27c60abe
commit be7aac96fe

View File

@ -91,7 +91,6 @@ public class GameData {
for (Player player : Bukkit.getOnlinePlayers()) { for (Player player : Bukkit.getOnlinePlayers()) {
initializePlayerData(player); // 初始化玩家数据 initializePlayerData(player); // 初始化玩家数据
} }
// 初始化主播参数
tasks.add(new BukkitRunnable() { tasks.add(new BukkitRunnable() {
@Override @Override
public void run() { public void run() {
@ -100,6 +99,12 @@ public class GameData {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
}
}.runTaskTimerAsynchronously(Main.plugin, 0L, 20L));
// 初始化主播参数
tasks.add(new BukkitRunnable() {
@Override
public void run() {
updateBossBar(); updateBossBar();
if (!checking) { if (!checking) {
checkComplete(); // 检测玩家当前挑战完成进度 checkComplete(); // 检测玩家当前挑战完成进度