mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Configure all the save timer
This commit is contained in:
parent
ee83e93269
commit
e36cd8109d
@ -71,7 +71,7 @@ public class LoadProperties {
|
||||
levelCapAcrobatics, levelCapArchery, levelCapAxes, levelCapExcavation,
|
||||
levelCapFishing, levelCapHerbalism, levelCapMining, levelCapRepair,
|
||||
levelCapSwords, levelCapTaming, levelCapUnarmed, levelCapWoodcutting,
|
||||
anvilID;
|
||||
anvilID, saveInterval;
|
||||
|
||||
public static double xpbackground_r, xpbackground_g, xpbackground_b,
|
||||
xpborder_r, xpborder_g, xpborder_b, fishing_r, fishing_g,
|
||||
@ -297,6 +297,7 @@ public class LoadProperties {
|
||||
enableMotd = readBoolean("General.MOTD.Enabled", true);
|
||||
enableMySpawn = readBoolean("General.MySpawn.Enabled", true);
|
||||
enableRegen = readBoolean("General.HP_Regeneration.Enabled", true);
|
||||
saveInterval = readInteger("General.Save_Interval", 10);
|
||||
|
||||
enableCobbleToMossy = readBoolean("Skills.Herbalism.Green_Thumb.Cobble_To_Mossy", true);
|
||||
enableSmoothToMossy = readBoolean("Skills.Herbalism.Green_Thumb.SmoothBrick_To_MossyBrick", true);
|
||||
|
@ -159,7 +159,7 @@ public class mcMMO extends JavaPlugin
|
||||
System.out.println(pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!" );
|
||||
|
||||
//Periodic save timer (Saves every 10 minutes)
|
||||
Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, mcMMO_SaveTimer, 0, 12000);
|
||||
Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, mcMMO_SaveTimer, 0, LoadProperties.saveInterval * 1200);
|
||||
|
||||
Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, mcMMO_Timer, 0, 20);
|
||||
//R2+ block place fix
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
This file is part of mcMMO.
|
||||
This file is part of mcMMO.
|
||||
|
||||
mcMMO is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -24,17 +24,17 @@ import com.gmail.nossr50.mcMMO;
|
||||
public class mcSaveTimer implements Runnable {
|
||||
private final mcMMO plugin;
|
||||
|
||||
public mcSaveTimer(final mcMMO plugin)
|
||||
public mcSaveTimer(final mcMMO plugin)
|
||||
{
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
public void run()
|
||||
{
|
||||
//All player data will be saved periodically through this
|
||||
for(Player player : plugin.getServer().getOnlinePlayers())
|
||||
{
|
||||
Users.getProfile(player).save();
|
||||
}
|
||||
}
|
||||
public void run()
|
||||
{
|
||||
//All player data will be saved periodically through this
|
||||
for(Player player : plugin.getServer().getOnlinePlayers())
|
||||
{
|
||||
Users.getProfile(player).save();
|
||||
}
|
||||
}
|
||||
}
|
@ -257,6 +257,8 @@ General:
|
||||
Enabled: true
|
||||
MOTD:
|
||||
Enabled: true
|
||||
#Amount of time (in minutes) to wait between saves of player information
|
||||
Save_Interval: 10
|
||||
Excavation:
|
||||
Drops:
|
||||
Cake: true
|
||||
|
Loading…
Reference in New Issue
Block a user