Package net.aufdemrand.denizen.objects

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


        // Fetch required objects
        Element required_integer = scriptEntry.getElement("required_integer");
        dLocation required_location = scriptEntry.getdObject("required_location");

        // Debug the execution
        dB.report(scriptEntry, getName(), required_integer.debug()
                                          + required_location.debug());

        // Do the execution

        // INSERT
View Full Code Here


        Element Generator = scriptEntry.getElement("generator");
        Element worldType = scriptEntry.getElement("worldtype");

        dB.report(scriptEntry, getName(), World_Name.debug() +
                                          (Generator != null ? Generator.debug(): "") +
                                          worldType.debug());

        World world;

        if (Generator != null)
            world = Bukkit.getServer().createWorld(WorldCreator
View Full Code Here

                dB.echoError("Empty braces!");
                return;
            }

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

            int target = quantity.asInt();
            if (target <= 0)
            {
                dB.echoDebug(scriptEntry, "Zero count, not looping...");
View Full Code Here

        Element typeElement = scriptEntry.getElement("type");
        dList text = (dList) scriptEntry.getObject("text");
        dLocation location = (dLocation) scriptEntry.getObject("location");

        // Report to dB
        dB.report(scriptEntry, getName(), typeElement.debug()
                                          + location.debug()
                                          + text.debug());

        Type type = Type.valueOf(typeElement.asString().toUpperCase());
        Block sign = location.getBlock();
View Full Code Here

        boolean persistent = scriptEntry.hasObject("persistent");

        // Report to dB
        dB.report(scriptEntry, getName(), aH.debugObj("entities", entities.toString()) +
                              location.debug() +
                             (spread != null  ?spread.debug() : "") +
                             (target != null ? target.debug() : "") +
                             (persistent ? aH.debugObj("persistent", "true") : ""));

        // Keep a dList of entities that can be called using <entry[name].spawned_entities>
        // later in the script queue
View Full Code Here

    @Override
    public void execute(final ScriptEntry scriptEntry) throws CommandExecutionException {

        Element name = (Element) scriptEntry.getObject("name");

        dB.report(scriptEntry, getName(), name.debug());

        NPC npc = ((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getCitizen();

        Location prev = npc.isSpawned() ? npc.getEntity().getLocation() : null;
        npc.despawn(DespawnReason.PENDING_RESPAWN);
View Full Code Here

        List<dEntity> entities = (List<dEntity>) scriptEntry.getObject("entities");
        dEntity source = (dEntity) scriptEntry.getObject("source");
        Element amountElement = scriptEntry.getElement("amount");

        dB.report(scriptEntry, getName(), amountElement.debug()
                                          + aH.debugList("entities", entities)
                                          + (source == null ? "" : source.debug()));

        double amount = amountElement.asDouble();
        for (dEntity entity : entities) {
View Full Code Here

        Element qty = scriptEntry.getElement("qty");
        Element action = scriptEntry.getElement("action");
        List<dEntity> targets = (List<dEntity>) scriptEntry.getObject("target");

        dB.report(scriptEntry, getName(), (qty != null ? qty.debug() : "") +
                                          (action != null ? action.debug() : "") +
                                          aH.debugObj("target", targets.toString()));

        if (qty == null && action == null)
            dB.echoError(scriptEntry.getResidingQueue(), "Null quantity!");
View Full Code Here

        Element percent = scriptEntry.getElement("percent");

        dNPC npc = ((BukkitScriptEntryData)scriptEntry.entryData).getNPC();
        FishingTrait trait = npc.getFishingTrait();

        dB.report(scriptEntry, getName(), location.debug() + katch.debug() + percent.debug() + stop.debug());

        if (stop.asBoolean()) {
            trait.stopFishing();
            return;
        }
View Full Code Here

        // Get objects
        Element state = scriptEntry.getElement("state");
        dEntity target = (dEntity) scriptEntry.getObject("target");

        // Report to dB
        dB.report(scriptEntry, getName(), state.debug() + target.debug());

        if (target.isNPC()) {
            NPC npc = target.getDenizenNPC().getCitizen();
            if (!npc.hasTrait(InvisibleTrait.class))
                npc.addTrait(InvisibleTrait.class);
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.