diff --git a/src/main/java/com/mmlsystem/StatusSystem/StatusFoundation.java b/src/main/java/com/mmlsystem/StatusSystem/StatusFoundation.java index 79dbf52..5ec229c 100644 --- a/src/main/java/com/mmlsystem/StatusSystem/StatusFoundation.java +++ b/src/main/java/com/mmlsystem/StatusSystem/StatusFoundation.java @@ -65,9 +65,8 @@ public class StatusFoundation extends JavaPlugin { objective.getScore(ChatColor.AQUA + "当前在线人数").setScore(7); objective.getScore(ChatColor.GREEN + " " + Bukkit.getOnlinePlayers().size()).setScore(6); objective.getScore(" ").setScore(5); - getTime(player); objective.getScore(ChatColor.AQUA + "在线时长").setScore(4); - objective.getScore(ChatColor.GREEN + " " + getTimeString()).setScore(3); + objective.getScore(ChatColor.GREEN + " " + "获取中").setScore(3); objective.getScore("").setScore(2); objective.getScore(ChatColor.GRAY + "mymc.life").setScore(1); @@ -87,8 +86,7 @@ public class StatusFoundation extends JavaPlugin { } objective.getScore(ChatColor.RED + " " + econ.getBalance(player) ).setScore(9); objective.getScore(ChatColor.GREEN + " " + Bukkit.getOnlinePlayers().size()).setScore(6); - getTime(player); - objective.getScore(ChatColor.GREEN + " " + getTimeString()).setScore(3); + objective.getScore(ChatColor.GREEN + " " + getTime(player)).setScore(3); } }.runTaskTimer(this, 0L, 100L); } @@ -97,8 +95,9 @@ public class StatusFoundation extends JavaPlugin { this.totalTime = time / 1000; } - public void getTime(Player player) { + public String getTime(Player player) { api.getPlayerOnlineTime(player, this::setTime); + return getTimeString(); } public String getTimeString() {