Package net.aufdemrand.denizen.npc.speech

Examples of net.aufdemrand.denizen.npc.speech.DenizenSpeechContext


        Element chatRange = scriptEntry.getElement("range");

        dB.report(scriptEntry, getName(), talkers.debug() + targets.debug() + message.debug() + chatRange.debug());

        // Create new speech context
        DenizenSpeechContext context = new DenizenSpeechContext(TagManager.cleanOutputFully(message.asString()),
                scriptEntry, chatRange.asDouble());

        if (!targets.isEmpty()) {
            for (dEntity ent : targets.filter(dEntity.class)) {
                context.addRecipient(ent.getBukkitEntity());
            }
        }

        for (dEntity talker : talkers.filter(dEntity.class)) {

            Entity entity = talker.getBukkitEntity();
            if (entity != null) {
                context.setTalker(entity);
                new DenizenSpeechController(entity).speak(context);
            }
            else {
                dB.echoDebug(scriptEntry, "Chat Talker is not spawned! Cannot talk.");
            }
View Full Code Here

TOP

Related Classes of net.aufdemrand.denizen.npc.speech.DenizenSpeechContext

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.