Package net.citizensnpcs.healers

Examples of net.citizensnpcs.healers.HealerTask


        if (!Settings.getBoolean("RegenHealerHealth")) {
            return;
        }
        for (HumanNPC entry : CitizensManager.getList().values()) {
            if (entry.isType("healer")) {
                HealerTask task = new HealerTask(entry);
                int delay = ((Healer) entry.getType("healer")).getHealthRegenRate();
                task.addID(Bukkit.getServer().getScheduler()
                        .scheduleSyncRepeatingTask(Citizens.plugin, task, delay, delay));
            }
        }
    }
View Full Code Here


    public void onNPCToggleType(NPCToggleTypeEvent event) {
        if (!event.getToggledType().equals("healer")) {
            return;
        }
        Healer healer = event.getNPC().getType("healer");
        HealerTask task = new HealerTask(event.getNPC());
        if (event.isToggledOn()) {
            int delay = healer.getHealthRegenRate();
            task.addID(Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(Citizens.plugin, task, delay, delay));
        } else {
            if ((task = HealerTask.getTask(event.getNPC().getUID())) != null) {
                task.cancel();
            }
        }
    }
View Full Code Here

TOP

Related Classes of net.citizensnpcs.healers.HealerTask

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.