Package net.citizensnpcs.questers.quests.progress

Examples of net.citizensnpcs.questers.quests.progress.QuestProgress


        PlayerProfile profile = PlayerProfile.getProfile(args.getString(1), false);
        if (profile.hasQuest() && !args.hasFlag('f')) {
            sender.sendMessage(ChatColor.GRAY + "Player already has a quest. Use the -f flag to force add the quest.");
            return;
        }
        profile.setProgress(new QuestProgress(args.getInteger(2), other, quest, System.currentTimeMillis()));
        if (other == null)
            profile.save();
        sender.sendMessage(ChatColor.GREEN + "Quest added.");
    }
View Full Code Here


        Bukkit.getPluginManager().callEvent(call);
        if (call.isCancelled()) {
            return false;
        }
        getProfile(player.getName()).setProgress(
                new QuestProgress(UID, player, questName, System.currentTimeMillis()));
        Messaging.send(player, quest.getAcceptanceText());
        return true;
    }
View Full Code Here

    public static void incrementQuest(Player player, Event event) {
        if (event == null || (event instanceof Cancellable && ((Cancellable) event).isCancelled()))
            return;
        if (hasQuest(player)) {
            QuestProgress progress = getProfile(player.getName()).getProgress();
            if (progress.isFullyCompleted())
                return;
            QuestIncrementEvent incrementEvent = new QuestIncrementEvent(QuestManager.getQuest(progress
                    .getQuestName()), player, event);
            Bukkit.getPluginManager().callEvent(incrementEvent);
            if (incrementEvent.isCancelled())
                return;
            progress.updateProgress(player, event);
            if (progress.isStepCompleted()) {
                progress.onStepCompletion();
                progress.cycle();
            }
        }
    }
View Full Code Here

                                        + StringUtils.wrap(profile.getString(path + ".name"), ChatColor.GRAY)
                                        + " no longer exists and has been aborted.");
                profile.removeKey("quests.current");
                break questLoad;
            }
            progress = new QuestProgress(profile.getInt(path + ".giver"), Bukkit.getServer().getPlayer(name),
                    profile.getString(path + ".name"), profile.getLong(path + ".start-time"));
            progress.setStep(profile.getInt(path + ".step"));
            if (progress.getProgress() != null) {
                int count = 0;
                for (ObjectiveProgress questProgress : progress.getProgress()) {
View Full Code Here

TOP

Related Classes of net.citizensnpcs.questers.quests.progress.QuestProgress

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.