无在线玩家则不执行自动保存
This commit is contained in:
parent
9107479b08
commit
17295b3ffa
@ -14,6 +14,9 @@ public class SaveManager {
|
||||
|
||||
public void saveAllPlayers() {
|
||||
boolean isFail = false;
|
||||
if (Bukkit.getOnlinePlayers().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
if (!listener.savePlayer(player)) {
|
||||
isFail = true;
|
||||
@ -24,7 +27,7 @@ public class SaveManager {
|
||||
foundation.getLogger().warning("已完成自动保存例程,但发生了错误。");
|
||||
}
|
||||
else {
|
||||
foundation.getLogger().info("已完成自动保存例程。");
|
||||
if (foundation.getConfig().getBoolean("logging")) { foundation.getLogger().info("已完成自动保存例程。"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user