Package net.aufdemrand.denizen.objects

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


        if (Generator != null)
            world = Bukkit.getServer().createWorld(WorldCreator
                    .name(World_Name.asString())
                    .generator(Generator.asString())
                    .type(WorldType.valueOf(worldType.asString().toUpperCase())));

        else
            world = Bukkit.getServer().createWorld(WorldCreator
                    .name(World_Name.asString())
                    .type(WorldType.valueOf(worldType.asString().toUpperCase())));
View Full Code Here


                    .type(WorldType.valueOf(worldType.asString().toUpperCase())));

        else
            world = Bukkit.getServer().createWorld(WorldCreator
                    .name(World_Name.asString())
                    .type(WorldType.valueOf(worldType.asString().toUpperCase())));

        if (world == null)
            dB.echoDebug(scriptEntry, "World is null! :(");

    }
View Full Code Here

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

        Type type = Type.valueOf(typeElement.asString().toUpperCase());
        Block sign = location.getBlock();
        if (type != Type.AUTOMATIC
                || (sign.getType() != Material.WALL_SIGN
                && sign.getType() != Material.SIGN_POST))
            sign.setType(type == Type.WALL_SIGN ? Material.WALL_SIGN: Material.SIGN_POST);
View Full Code Here

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

        Location prev = npc.isSpawned() ? npc.getEntity().getLocation() : null;
        npc.despawn(DespawnReason.PENDING_RESPAWN);
        npc.setName(name.asString().length() > 100 ? name.asString().substring(0, 100): name.asString());
        if (prev != null)
            npc.spawn(prev);

    }
}
View Full Code Here

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

        Location prev = npc.isSpawned() ? npc.getEntity().getLocation() : null;
        npc.despawn(DespawnReason.PENDING_RESPAWN);
        npc.setName(name.asString().length() > 100 ? name.asString().substring(0, 100): name.asString());
        if (prev != null)
            npc.spawn(prev);

    }
}
View Full Code Here

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

        Location prev = npc.isSpawned() ? npc.getEntity().getLocation() : null;
        npc.despawn(DespawnReason.PENDING_RESPAWN);
        npc.setName(name.asString().length() > 100 ? name.asString().substring(0, 100): name.asString());
        if (prev != null)
            npc.spawn(prev);

    }
}
View Full Code Here

        if (action == null)
            action = Element.TRUE;

        for (dEntity target: targets) {
            if (target.isNPC()) {
                if (action.asString().equalsIgnoreCase("true"))
                    target.getDenizenNPC().getCitizen().addTrait(HealthTrait.class);
                else if (action.asString().equalsIgnoreCase("false"))
                    target.getDenizenNPC().getCitizen().removeTrait(HealthTrait.class);
                else if (target.getDenizenNPC().getCitizen().hasTrait(HealthTrait.class))
                    target.getDenizenNPC().getCitizen().removeTrait(HealthTrait.class);
View Full Code Here

        for (dEntity target: targets) {
            if (target.isNPC()) {
                if (action.asString().equalsIgnoreCase("true"))
                    target.getDenizenNPC().getCitizen().addTrait(HealthTrait.class);
                else if (action.asString().equalsIgnoreCase("false"))
                    target.getDenizenNPC().getCitizen().removeTrait(HealthTrait.class);
                else if (target.getDenizenNPC().getCitizen().hasTrait(HealthTrait.class))
                    target.getDenizenNPC().getCitizen().removeTrait(HealthTrait.class);
                else
                    target.getDenizenNPC().getCitizen().addTrait(HealthTrait.class);
View Full Code Here

        if (target.isNPC()) {
            NPC npc = target.getDenizenNPC().getCitizen();
            if (!npc.hasTrait(InvisibleTrait.class))
                npc.addTrait(InvisibleTrait.class);
            InvisibleTrait trait = npc.getTrait(InvisibleTrait.class);
            switch (Action.valueOf(state.asString().toUpperCase())) {
                case FALSE:
                    trait.setInvisible(false);
                    break;
                case TRUE:
                    trait.setInvisible(true);
View Full Code Here

                    trait.toggle();
                    break;
            }
        }
        else {
            switch (Action.valueOf(state.asString().toUpperCase())) {
                case FALSE:
                    target.getLivingEntity().removePotionEffect(PotionEffectType.INVISIBILITY);
                    break;
                case TRUE:
                    new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1).apply(target.getLivingEntity());
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.