Package com.palmergames.bukkit.towny.tasks

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


        long delay = TownySettings.getRegenDelay();
        if (delay > 0) {
          if (!plugin.getTownyUniverse().isPlaceholder(block)) {
            if (!plugin.getTownyUniverse().hasProtectionRegenTask(new BlockLocation(block.getLocation()))) {
              ProtectionRegenTask task = new ProtectionRegenTask(plugin.getTownyUniverse(), block, true);
              task.setTaskId(plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, task, 20 * delay));
              plugin.getTownyUniverse().addProtectionRegenTask(task);
            }
          } else {
            plugin.getTownyUniverse().removePlaceholder(block);
            block.setTypeId(0, false);
View Full Code Here


        if (townyWorld.isUsingTowny())
          if (townyWorld.isExpl()) {
            if (townyWorld.isUsingPlotManagementWildRevert()) {
              if (entity instanceof Creature) {
                if (!plugin.getTownyUniverse().hasProtectionRegenTask(new BlockLocation(block.getLocation()))) {
                  ProtectionRegenTask task = new ProtectionRegenTask(plugin.getTownyUniverse(), block, false);
                  task.setTaskId(plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, task, ((TownySettings.getPlotManagementWildRegenDelay() + count) * 20)));
                  plugin.getTownyUniverse().addProtectionRegenTask(task);
                  event.setYield((float) 0.0);
                }
              }
            }
View Full Code Here

TOP

Related Classes of com.palmergames.bukkit.towny.tasks.ProtectionRegenTask

Copyright © 2018 www.massapicom. 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.