Examples of asInt()


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

        // then set their targets if applicable

        for (dEntity entity : entities) {
            Location loc = location.clone();
            if (spread != null) {
                loc.add(CoreUtilities.getRandom().nextInt(spread.asInt() * 2) - spread.asInt(),
                        0,
                        CoreUtilities.getRandom().nextInt(spread.asInt() * 2) - spread.asInt());
            }

            entity.spawnAt(loc);
View Full Code Here

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

        // then set their targets if applicable

        for (dEntity entity : entities) {
            Location loc = location.clone();
            if (spread != null) {
                loc.add(CoreUtilities.getRandom().nextInt(spread.asInt() * 2) - spread.asInt(),
                        0,
                        CoreUtilities.getRandom().nextInt(spread.asInt() * 2) - spread.asInt());
            }

            entity.spawnAt(loc);
View Full Code Here

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

        for (dEntity entity : entities) {
            Location loc = location.clone();
            if (spread != null) {
                loc.add(CoreUtilities.getRandom().nextInt(spread.asInt() * 2) - spread.asInt(),
                        0,
                        CoreUtilities.getRandom().nextInt(spread.asInt() * 2) - spread.asInt());
            }

            entity.spawnAt(loc);

            // Only add to entityList after the entities have been
View Full Code Here

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

        for (dEntity entity : entities) {
            Location loc = location.clone();
            if (spread != null) {
                loc.add(CoreUtilities.getRandom().nextInt(spread.asInt() * 2) - spread.asInt(),
                        0,
                        CoreUtilities.getRandom().nextInt(spread.asInt() * 2) - spread.asInt());
            }

            entity.spawnAt(loc);

            // Only add to entityList after the entities have been
View Full Code Here

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

            return;
        }

        npc.getEquipmentTrait().set(0, new ItemStack(Material.FISHING_ROD));

        trait.setCatchPercent(percent.asInt());
        trait.setCatchType(FishingTrait.CatchType.valueOf(katch.asString().toUpperCase()));
        trait.startFishing(location);

    }
}
View Full Code Here

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

                             aH.debugObj("primary colors", primary.toString()) +
                             (fade != null ? aH.debugObj("fade colors", fade.toString()) : ""));

        Firework firework = location.getWorld().spawn(location, Firework.class);
        FireworkMeta fireworkMeta = firework.getFireworkMeta();
        fireworkMeta.setPower(power.asInt());

        Builder fireworkBuilder = FireworkEffect.builder();
        fireworkBuilder.with(FireworkEffect.Type.valueOf(type.asString().toUpperCase()));

                          fireworkBuilder.withColor(Conversion.convertColors(primary));
View Full Code Here

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

                trait.toggleTrigger(trigger.asString(), false);
                break;
        }

        if (radius != null)
            trait.setLocalRadius(trigger.asString(), radius.asInt());

        if (cooldown != null && cooldown.getSeconds() > 0)
            trait.setLocalCooldown(trigger.asString(), cooldown.getSeconds());
    }
}
View Full Code Here

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

        if (npc != null) {
            if (!npc.getCitizen().hasTrait(HungerTrait.class)) {
                dB.echoError(scriptEntry.getResidingQueue(), "This NPC does not have the HungerTrait enabled! Use /trait hunger");
                return;
            }
            npc.getCitizen().getTrait(HungerTrait.class).feed(amount.asInt());
        }
        else if (player != null) {
            if (95999 - player.getPlayerEntity().getFoodLevel() < amount.asInt()) // Setting hunger too high = error
                amount = new Element(95999 - player.getPlayerEntity().getFoodLevel());
            player.getPlayerEntity().setFoodLevel(player.getPlayerEntity().getFoodLevel() + amount.asInt());
View Full Code Here

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

                return;
            }
            npc.getCitizen().getTrait(HungerTrait.class).feed(amount.asInt());
        }
        else if (player != null) {
            if (95999 - player.getPlayerEntity().getFoodLevel() < amount.asInt()) // Setting hunger too high = error
                amount = new Element(95999 - player.getPlayerEntity().getFoodLevel());
            player.getPlayerEntity().setFoodLevel(player.getPlayerEntity().getFoodLevel() + amount.asInt());
        }
        else {
            dB.echoError(scriptEntry.getResidingQueue(), "No target?"); // Mostly just here to quiet code analyzers.
View Full Code Here

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

            npc.getCitizen().getTrait(HungerTrait.class).feed(amount.asInt());
        }
        else if (player != null) {
            if (95999 - player.getPlayerEntity().getFoodLevel() < amount.asInt()) // Setting hunger too high = error
                amount = new Element(95999 - player.getPlayerEntity().getFoodLevel());
            player.getPlayerEntity().setFoodLevel(player.getPlayerEntity().getFoodLevel() + amount.asInt());
        }
        else {
            dB.echoError(scriptEntry.getResidingQueue(), "No target?"); // Mostly just here to quiet code analyzers.
        }
    }
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.