setChangedNotify(TOGGLE_DAILY_TIMER);
}
public void toggleHealthRegen(boolean on) {
if (on && !isHealthRegenRunning()) {
healthRegenTask = getPlugin().getServer().getScheduler().scheduleSyncRepeatingTask(getPlugin(), new HealthRegenTimerTask(this, plugin.getServer()), 0, MinecraftTools.convertToTicks(TownySettings.getHealthRegenSpeed()));
if (healthRegenTask == -1)
TownyMessaging.sendErrorMsg("Could not schedule health regen loop.");
} else if (!on && isHealthRegenRunning()) {
getPlugin().getServer().getScheduler().cancelTask(healthRegenTask);
healthRegenTask = -1;