版本更新至 3.67

修复:DataUtils 工具载入时不定时报错的问题。
This commit is contained in:
坏黑 2018-02-26 21:14:12 +08:00
parent 648df93305
commit 778a454e18
2 changed files with 3 additions and 3 deletions

View File

@ -207,8 +207,8 @@ public class Main extends JavaPlugin implements Listener {
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() {

View File

@ -32,7 +32,7 @@ public class DataUtils implements Listener {
}
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()) {