Examples of Talkable


Examples of net.citizensnpcs.api.ai.speech.Talkable

    public void talk(SpeechContext speechContext) {
        if (!(speechContext instanceof DenizenSpeechContext)) return;

        DenizenSpeechContext context = (DenizenSpeechContext) speechContext;

        Talkable talker = context.getTalker();
        if (talker == null) return;

        ScriptEntry entry = context.getScriptEntry();
        ScriptQueue queue = entry.getResidingQueue();

        String defTalker = null;
        if (queue.hasDefinition("talker"))
            defTalker = queue.getDefinition("talker");
        queue.addDefinition("talker", new dEntity(talker.getEntity()).identify());

        String defMessage = null;
        if (queue.hasDefinition("message"))
            defMessage = queue.getDefinition("message");
        queue.addDefinition("message", context.getMessage());
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.