Examples of HealthRegenTimerTask


Examples of com.palmergames.bukkit.towny.tasks.HealthRegenTimerTask

    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;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.