Examples of QuestCancelEvent


Examples of net.citizensnpcs.questers.api.events.QuestCancelEvent

        PlayerProfile profile = PlayerProfile.getProfile(player.getName());
        if (!profile.hasQuest()) {
            player.sendMessage(ChatColor.GRAY + "You don't have a quest at the moment.");
        } else {
            Bukkit.getPluginManager().callEvent(
                    new QuestCancelEvent(QuestManager.getQuest(profile.getProgress().getQuestName()), player));
            List<Reward> abort = QuestManager.getQuest(profile.getQuest()).getAbortRewards();
            if (abort != null) {
                for (Reward reward : abort)
                    reward.grant(player, profile.getProgress().getQuesterUID());
            }
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.