Package net.citizensnpcs.questers.quests

Examples of net.citizensnpcs.questers.quests.Objective


    @Override
    public boolean update(Event event, ObjectiveProgress progress) {
        if (event instanceof PlayerMoveEvent) {
            PlayerMoveEvent ev = (PlayerMoveEvent) event;
            Objective objective = progress.getObjective();
            double leeway = objective.hasParameter("leeway") ? objective.getParameter("leeway").getDouble() : objective
                    .getAmount();
            if (LocationUtils.withinRange(ev.getTo(), objective.getLocation(), leeway)
                    && withinYawRange(ev.getTo(), objective)) {
                if (!objective.hasParameter("time"))
                    return true;
                return updateTime(objective.getParameter("time").getInt(), progress.getPlayer());
            } else
                reachTimes.remove(progress.getPlayer());
        }
        return false;
    }
View Full Code Here

TOP

Related Classes of net.citizensnpcs.questers.quests.Objective

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.