Skip to content

Commit

Permalink
版本更新至 3.67
Browse files Browse the repository at this point in the history
修复:DataUtils 工具载入时不定时报错的问题。
  • Loading branch information
Bkm016 committed Feb 26, 2018
1 parent 81ec65a commit 588cc17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/src/me/skymc/taboolib/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ public void onEnable() {
MsgUtils.send("§7游戏版本: §f" + TabooLib.getVerint());

// 文件保存
Bukkit.getScheduler().runTaskTimerAsynchronously(this, () -> DataUtils.saveAllCaches(), 0, 20 * 120);
Bukkit.getScheduler().runTaskTimerAsynchronously(this, () -> PlayerDataManager.saveAllCaches(true, false), 0, 20 * 60);
Bukkit.getScheduler().runTaskTimerAsynchronously(this, () -> DataUtils.saveAllCaches(), 20, 20 * 120);
Bukkit.getScheduler().runTaskTimerAsynchronously(this, () -> PlayerDataManager.saveAllCaches(true, false), 20, 20 * 60);

// 插件联动
new BukkitRunnable() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/src/me/skymc/taboolib/playerdata/DataUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static void saveAllCahces(Plugin plugin) {
}

public static void saveAllCaches(Plugin plugin, boolean remove) {
if (!CACHE_DATA_PLUGIN.containsKey(plugin.getName())) {
if (plugin == null || !CACHE_DATA_PLUGIN.containsKey(plugin.getName())) {
return;
}
for (String fileName : CACHE_DATA_PLUGIN.get(plugin.getName()).keySet()) {
Expand Down

0 comments on commit 588cc17

Please sign in to comment.