Package net.aufdemrand.denizen.objects

Examples of net.aufdemrand.denizen.objects.Duration.debug()


        Duration delay = (Duration) scriptEntry.getObject("delay");

        // Debug output
        dB.report(scriptEntry, getName(),
                script.debug()
                        + (delay != null ? delay.debug() : "")
                        + aH.debugObj("Instant", instant.toString())
                        + aH.debugObj("Queue", id)
                        + (context != null ? aH.debugObj("Context", context.toString()) : "")
                        + (((BukkitScriptEntryData)scriptEntry.entryData).getPlayer() != null
                        ? aH.debugObj("Player", ((BukkitScriptEntryData)scriptEntry.entryData).getPlayer().getName()) : "")
View Full Code Here


        ScriptQueue queue = (ScriptQueue) scriptEntry.getObject("queue");
        Duration delay = (Duration) scriptEntry.getObject("delay");

        dB.report(scriptEntry, getName(),
                aH.debugObj("queue", queue.id) + delay.debug());

        // Tell the queue to delay
        if (queue instanceof Delayable)
               ((Delayable) queue).delayFor(delay);
        else {
View Full Code Here

        // Report to dB
        dB.report(scriptEntry, getName(),
                aH.debugObj("Target(s)", entities.toString())
                        + aH.debugObj("Effect", effect.getName())
                        + aH.debugObj("Amplifier", amplifier)
                        + duration.debug());

        // Apply the PotionEffect to the targets!
        for (dEntity entity : entities) {
            if (entity.getLivingEntity().hasPotionEffect(effect))
                entity.getLivingEntity().removePotionEffect(effect);
View Full Code Here

        Duration delay = (Duration) scriptEntry.getObject("delay");

        // Debugger
        dB.report(scriptEntry, getName(), queue.debug()
                + aH.debugObj("Action", action.toString())
                + (action == Action.DELAY ? delay.debug() : ""));

        switch (action) {

            case CLEAR:
                queue.clear();
View Full Code Here

        dNPC npc = scriptEntry.hasObject("npc") ? (dNPC) scriptEntry.getObject("npc") : ((BukkitScriptEntryData)scriptEntry.entryData).getNPC();

        dB.report(scriptEntry, getName(),
                trigger.debug() + toggle.debug() +
                        (radius != null ? radius.debug(): "") +
                        (cooldown != null ? cooldown.debug(): "") +
                        npc.debug());

        // Add trigger trait
        if (!npc.getCitizen().hasTrait(TriggerTrait.class)) npc.getCitizen().addTrait(TriggerTrait.class);
View Full Code Here

    public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {

        Duration duration = scriptEntry.getdObject("duration");

        // Report to dB
        dB.report(scriptEntry, getName(), duration.debug());

        if (duration.getSecondsAsInt() > 0)
            setEngaged(((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getCitizen(), duration.getSecondsAsInt());
        else
            setEngaged(((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getCitizen(), true);
View Full Code Here

        Element type_element = scriptEntry.getElement("type");
        Type type = Type.valueOf(type_element.asString().toUpperCase());

        // Report to dB
        dB.report(scriptEntry, getName(), type_element.debug()
                                          + value.debug()
                                          + world.debug());

        if (type.equals(Type.GLOBAL)) {
            world.getWorld().setTime(value.getTicks());
        }
View Full Code Here

        // Get objects
        List<dEntity> entities = (List<dEntity>) scriptEntry.getObject("entities");
        Duration duration = (Duration) scriptEntry.getObject("duration");

        // Report to dB
        dB.report(scriptEntry, getName(), duration.debug() +
                aH.debugObj("entities", entities.toString()));

        // Go through all the entities and set them on fire
        for (dEntity entity : entities) {
            if (entity.isSpawned()) {
View Full Code Here

        // Report to dB
        dB.report(scriptEntry, getName(), (cancel ? aH.debugObj("cancel", cancel) : "") +
                             aH.debugObj("entities", entities.toString()) +
                             (infinite ? aH.debugObj("duration", "infinite") : duration.debug()) +
                             frequency.debug() +
                             yaw.debug() +
                             pitch.debug());

        // Add entities to the rotatingEntities list or remove
        // them from it
View Full Code Here

        Duration duration = (Duration) scriptEntry.getObject("duration");

        dB.report(scriptEntry, getName(), ((BukkitScriptEntryData)scriptEntry.entryData).getPlayer().debug() + script.debug()
                + (scriptEntry.hasObject("step")
                ? scriptEntry.getElement("step").debug() : aH.debugObj("step", "++ (inc)"))
                + (duration != null ? duration.debug() : ""));

        String step = scriptEntry.hasObject("step") ? scriptEntry.getElement("step").asString() : null;

        // Let's get the current step for reference.
        String currentStep = InteractScriptHelper.getCurrentStep(((BukkitScriptEntryData)scriptEntry.entryData).getPlayer(), script.getName());
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.