Package net.citizensnpcs.wizards

Examples of net.citizensnpcs.wizards.WizardTask


    @EventHandler
    public void onNPCToggleType(NPCToggleTypeEvent event) {
        if (!event.getToggledType().equals("wizard")) {
            return;
        }
        WizardTask task = new WizardTask(event.getNPC());
        if (event.isToggledOn()) {
            task.addID(Bukkit
                    .getServer()
                    .getScheduler()
                    .scheduleSyncRepeatingTask(Citizens.plugin, task, Settings.getInt("WizardManaRegenRate"),
                            Settings.getInt("WizardManaRegenRate")));
        } else {
            if ((task = WizardTask.getTask(event.getNPC().getUID())) != null) {
                task.cancel();
            }
        }
    }
View Full Code Here


        if (!Settings.getBoolean("RegenWizardMana")) {
            return;
        }
        for (HumanNPC entry : CitizensManager.getList().values()) {
            if (entry.isType("wizard")) {
                WizardTask task = new WizardTask(entry);
                task.addID(Bukkit
                        .getServer()
                        .getScheduler()
                        .scheduleSyncRepeatingTask(Citizens.plugin, task, Settings.getInt("WizardManaRegenRate"),
                                Settings.getInt("WizardManaRegenRate")));
            }
View Full Code Here

TOP

Related Classes of net.citizensnpcs.wizards.WizardTask

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.