mirror of
https://e.coding.net/circlecloud/Residence.git
synced 2024-10-31 22:38:48 +00:00
add information while load or save file...
Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
parent
3e28dc9063
commit
05846a0189
@ -359,6 +359,7 @@ public class Residence extends JavaPlugin {
|
||||
}
|
||||
YMLSaveHelper yml;
|
||||
File loadFile;
|
||||
long time = System.currentTimeMillis();
|
||||
HashMap<String, Object> worlds = new HashMap<String, Object>();
|
||||
for (World world : server.getWorlds()) {
|
||||
loadFile = new File(worldFolder, "res_" + world.getName() + ".yml");
|
||||
@ -397,10 +398,13 @@ public class Residence extends JavaPlugin {
|
||||
rentmanager = RentManager.load((Map<String, Object>) yml.getRoot()
|
||||
.get("RentSystem"));
|
||||
}
|
||||
this.getLogger().info(
|
||||
"从配置文件中读取领地数据,耗时" + ((float) (System.currentTimeMillis() - time) / 1000)
|
||||
+ " 秒)");
|
||||
// System.out.print("[Residence] Loaded...");
|
||||
return true;
|
||||
} catch (Exception ex) {
|
||||
this.getLogger().warning("领地数据载入时发生错误,请报告一下内容给作者: ");
|
||||
this.getLogger().warning("领地数据载入时发生错误,请报告以下内容给作者: ");
|
||||
this.getLogger().warning("错误: " + ex);
|
||||
throw ex;
|
||||
}
|
||||
@ -618,6 +622,7 @@ public class Residence extends JavaPlugin {
|
||||
File worldFolder = new File(saveFolder, "Worlds");
|
||||
worldFolder.mkdirs();
|
||||
YMLSaveHelper yml;
|
||||
long time = System.currentTimeMillis();
|
||||
Map<String, Object> save = rmanager.save();
|
||||
for (Entry<String, Object> entry : save.entrySet()) {
|
||||
File ymlSaveLoc = new File(worldFolder, "res_" + entry.getKey() + ".yml");
|
||||
@ -714,7 +719,8 @@ public class Residence extends JavaPlugin {
|
||||
ymlSaveLoc.renameTo(backupFile);
|
||||
}
|
||||
tmpFile.renameTo(ymlSaveLoc);
|
||||
|
||||
this.getLogger().info(
|
||||
"保存领地数据到文件中,耗时" + ((float) (System.currentTimeMillis() - time) / 1000) + " 秒)");
|
||||
if (cmanager.showIntervalMessages()) {
|
||||
this.getLogger().info(" - 保存插件数据...");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user