Java 类org.bukkit.conversations.Conversation 实例源码

项目:Minecordbot    文件:ConvoTracker.java   
public synchronized void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) {
    if (!this.conversationQueue.isEmpty()) {
        if (this.conversationQueue.getFirst() == conversation) {
            conversation.abandon(details);
        }

        if (this.conversationQueue.contains(conversation)) {
            this.conversationQueue.remove(conversation);
        }

        if (!this.conversationQueue.isEmpty()) {
            ((Conversation) this.conversationQueue.getFirst()).outputNextPrompt();
        }
    }

}
项目:Minecordbot    文件:ConvoTracker.java   
public synchronized void abandonAllConversations() {
    LinkedList oldQueue = this.conversationQueue;
    this.conversationQueue = new LinkedList();
    Iterator var2 = oldQueue.iterator();

    while (var2.hasNext()) {
        Conversation conversation = (Conversation) var2.next();

        try {
            conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller()));
        } catch (Throwable var5) {
            Bukkit.getLogger().log(Level.SEVERE, "Unexpected exception while abandoning a conversation", var5);
        }
    }

}
项目:Minecordbot-v0-obsolete    文件:ConvoTracker.java   
public synchronized void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) {
    if (!this.conversationQueue.isEmpty()) {
        if (this.conversationQueue.getFirst() == conversation) {
            conversation.abandon(details);
        }

        if (this.conversationQueue.contains(conversation)) {
            this.conversationQueue.remove(conversation);
        }

        if (!this.conversationQueue.isEmpty()) {
            ((Conversation) this.conversationQueue.getFirst()).outputNextPrompt();
        }
    }

}
项目:Minecordbot-v0-obsolete    文件:ConvoTracker.java   
public synchronized void abandonAllConversations() {
    LinkedList oldQueue = this.conversationQueue;
    this.conversationQueue = new LinkedList();
    Iterator var2 = oldQueue.iterator();

    while (var2.hasNext()) {
        Conversation conversation = (Conversation) var2.next();

        try {
            conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller()));
        } catch (Throwable var5) {
            Bukkit.getLogger().log(Level.SEVERE, "Unexpected exception while abandoning a conversation", var5);
        }
    }

}
项目:GoldRushPlugin    文件:Bank.java   
/**
 * In charge of monitoring where the player is during conversations.
 * <p>
 * Determines whether or not a conversation should start, continue, or stop.
 *
 * @param pme The event of Player Movement.
 */
@EventHandler
public void dialogMonitor(PlayerMoveEvent pme) {
    Block from = pme.getFrom().getBlock(), to = pme.getTo().getBlock();
    Player p = pme.getPlayer();

    if(helpedBy.containsKey(p.getName())) {
        //Leaving Conversation
        if(!tellerAreas.containsKey(to) && tellerAreas.containsKey(from)) {
            if(tellerAreas.get(from).equals(helpedBy.get(p.getName()))) {
                Conversation c = conversations.get(p.getName());
                if(c.getState().equals(Conversation.ConversationState.STARTED)) c.abandon();
                conversations.remove(p.getName());
                helpedBy.remove(p.getName());
            }
        }
    }
    //Entering Conversation
    if(tellerAreas.containsKey(to) && !tellerAreas.containsKey(from)) {
        if(helpedBy.get(p.getName()) == null) {
            NPC employee = tellerAreas.get(to);
            helpedBy.put(p.getName(), employee);
            conversations.put(p.getName(), startTransaction(p, employee));
        }
    }
}
项目:KTP    文件:UHPluginListener.java   
@EventHandler
public void onInventoryClick(InventoryClickEvent ev) {
    if (ev.getInventory().getName().equals("- Teams -")) {
        Player pl = (Player) ev.getWhoClicked();
        ev.setCancelled(true);
        if (ev.getCurrentItem().getType() == Material.DIAMOND) {
            pl.closeInventory();
            p.getConversationFactory("teamPrompt").buildConversation(pl).begin();
        } else if (ev.getCurrentItem().getType() == Material.BEACON) {
            pl.closeInventory();
            Conversation c = p.getConversationFactory("playerPrompt").buildConversation(pl);
            c.getContext().setSessionData("nomTeam", ChatColor.stripColor(ev.getCurrentItem().getItemMeta().getDisplayName()));
            c.getContext().setSessionData("color", p.getTeam(ChatColor.stripColor(ev.getCurrentItem().getItemMeta().getDisplayName())).getChatColor());
            c.begin();
        }
    }
}
项目:Uranium    文件:ConversationTracker.java   
public synchronized boolean beginConversation(Conversation conversation) {
    if (!conversationQueue.contains(conversation)) {
        conversationQueue.addLast(conversation);
        if (conversationQueue.getFirst() == conversation) {
            conversation.begin();
            conversation.outputNextPrompt();
            return true;
        }
    }
    return true;
}
项目:Uranium    文件:ConversationTracker.java   
public synchronized void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) {
    if (!conversationQueue.isEmpty()) {
        if (conversationQueue.getFirst() == conversation) {
            conversation.abandon(details);
        }
        if (conversationQueue.contains(conversation)) {
            conversationQueue.remove(conversation);
        }
        if (!conversationQueue.isEmpty()) {
            conversationQueue.getFirst().outputNextPrompt();
        }
    }
}
项目:Uranium    文件:ConversationTracker.java   
public synchronized void abandonAllConversations() {

        LinkedList<Conversation> oldQueue = conversationQueue;
        conversationQueue = new LinkedList<Conversation>();
        for(Conversation conversation : oldQueue) {
            try {
            conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller()));
            } catch (Throwable t) {
                Bukkit.getLogger().log(Level.SEVERE, "Unexpected exception while abandoning a conversation", t);
            }
        }
    }
项目:Minecordbot    文件:ConvoTracker.java   
public synchronized boolean beginConversation(Conversation conversation) {
    if (!this.conversationQueue.contains(conversation)) {
        this.conversationQueue.addLast(conversation);
        if (this.conversationQueue.getFirst() == conversation) {
            conversation.begin();
            conversation.outputNextPrompt();
            return true;
        }
    }

    return true;
}
项目:ThermosRebased    文件:ConversationTracker.java   
public synchronized boolean beginConversation(Conversation conversation) {
    if (!conversationQueue.contains(conversation)) {
        conversationQueue.addLast(conversation);
        if (conversationQueue.getFirst() == conversation) {
            conversation.begin();
            conversation.outputNextPrompt();
            return true;
        }
    }
    return true;
}
项目:ThermosRebased    文件:ConversationTracker.java   
public synchronized void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) {
    if (!conversationQueue.isEmpty()) {
        if (conversationQueue.getFirst() == conversation) {
            conversation.abandon(details);
        }
        if (conversationQueue.contains(conversation)) {
            conversationQueue.remove(conversation);
        }
        if (!conversationQueue.isEmpty()) {
            conversationQueue.getFirst().outputNextPrompt();
        }
    }
}
项目:ThermosRebased    文件:ConversationTracker.java   
public synchronized void abandonAllConversations() {

        LinkedList<Conversation> oldQueue = conversationQueue;
        conversationQueue = new LinkedList<Conversation>();
        for(Conversation conversation : oldQueue) {
            try {
            conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller()));
            } catch (Throwable t) {
                Bukkit.getLogger().log(Level.SEVERE, "Unexpected exception while abandoning a conversation", t);
            }
        }
    }
项目:Minecordbot-v0-obsolete    文件:ConvoTracker.java   
public synchronized boolean beginConversation(Conversation conversation) {
    if (!this.conversationQueue.contains(conversation)) {
        this.conversationQueue.addLast(conversation);
        if (this.conversationQueue.getFirst() == conversation) {
            conversation.begin();
            conversation.outputNextPrompt();
            return true;
        }
    }

    return true;
}
项目:ExilePearl    文件:TestConversationTracker.java   
public synchronized boolean beginConversation(Conversation conversation) {
    if (!conversationQueue.contains(conversation)) {
        conversationQueue.addLast(conversation);
        if (conversationQueue.getFirst() == conversation) {
            conversation.begin();
            conversation.outputNextPrompt();
            return true;
        }
    }
    return true;
}
项目:ExilePearl    文件:TestConversationTracker.java   
public synchronized void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) {
    if (!conversationQueue.isEmpty()) {
        if (conversationQueue.getFirst() == conversation) {
            conversation.abandon(details);
        }
        if (conversationQueue.contains(conversation)) {
            conversationQueue.remove(conversation);
        }
        if (!conversationQueue.isEmpty()) {
            conversationQueue.getFirst().outputNextPrompt();
        }
    }
}
项目:ExilePearl    文件:TestConversationTracker.java   
public synchronized void abandonAllConversations() {

        LinkedList<Conversation> oldQueue = conversationQueue;
        conversationQueue = new LinkedList<Conversation>();
        for (Conversation conversation : oldQueue) {
            try {
                conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller()));
            } catch (Throwable t) {
                Bukkit.getLogger().log(Level.SEVERE, "Unexpected exception while abandoning a conversation", t);
            }
        }
    }
项目:Thermos    文件:ConversationTracker.java   
public synchronized boolean beginConversation(Conversation conversation) {
    if (!conversationQueue.contains(conversation)) {
        conversationQueue.addLast(conversation);
        if (conversationQueue.getFirst() == conversation) {
            conversation.begin();
            conversation.outputNextPrompt();
            return true;
        }
    }
    return true;
}
项目:Thermos    文件:ConversationTracker.java   
public synchronized void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) {
    if (!conversationQueue.isEmpty()) {
        if (conversationQueue.getFirst() == conversation) {
            conversation.abandon(details);
        }
        if (conversationQueue.contains(conversation)) {
            conversationQueue.remove(conversation);
        }
        if (!conversationQueue.isEmpty()) {
            conversationQueue.getFirst().outputNextPrompt();
        }
    }
}
项目:Thermos    文件:ConversationTracker.java   
public synchronized void abandonAllConversations() {

        LinkedList<Conversation> oldQueue = conversationQueue;
        conversationQueue = new LinkedList<Conversation>();
        for(Conversation conversation : oldQueue) {
            try {
            conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller()));
            } catch (Throwable t) {
                Bukkit.getLogger().log(Level.SEVERE, "Unexpected exception while abandoning a conversation", t);
            }
        }
    }
项目:KCauldron    文件:ConversationTracker.java   
public synchronized boolean beginConversation(Conversation conversation) {
    if (!conversationQueue.contains(conversation)) {
        conversationQueue.addLast(conversation);
        if (conversationQueue.getFirst() == conversation) {
            conversation.begin();
            conversation.outputNextPrompt();
            return true;
        }
    }
    return true;
}
项目:KCauldron    文件:ConversationTracker.java   
public synchronized void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) {
    if (!conversationQueue.isEmpty()) {
        if (conversationQueue.getFirst() == conversation) {
            conversation.abandon(details);
        }
        if (conversationQueue.contains(conversation)) {
            conversationQueue.remove(conversation);
        }
        if (!conversationQueue.isEmpty()) {
            conversationQueue.getFirst().outputNextPrompt();
        }
    }
}
项目:KCauldron    文件:ConversationTracker.java   
public synchronized void abandonAllConversations() {

        LinkedList<Conversation> oldQueue = conversationQueue;
        conversationQueue = new LinkedList<Conversation>();
        for(Conversation conversation : oldQueue) {
            try {
            conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller()));
            } catch (Throwable t) {
                Bukkit.getLogger().log(Level.SEVERE, "Unexpected exception while abandoning a conversation", t);
            }
        }
    }
项目:CauldronGit    文件:ConversationTracker.java   
public synchronized boolean beginConversation(Conversation conversation) {
    if (!conversationQueue.contains(conversation)) {
        conversationQueue.addLast(conversation);
        if (conversationQueue.getFirst() == conversation) {
            conversation.begin();
            conversation.outputNextPrompt();
            return true;
        }
    }
    return true;
}
项目:CauldronGit    文件:ConversationTracker.java   
public synchronized void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) {
    if (!conversationQueue.isEmpty()) {
        if (conversationQueue.getFirst() == conversation) {
            conversation.abandon(details);
        }
        if (conversationQueue.contains(conversation)) {
            conversationQueue.remove(conversation);
        }
        if (!conversationQueue.isEmpty()) {
            conversationQueue.getFirst().outputNextPrompt();
        }
    }
}
项目:CauldronGit    文件:ConversationTracker.java   
public synchronized void abandonAllConversations() {

        LinkedList<Conversation> oldQueue = conversationQueue;
        conversationQueue = new LinkedList<Conversation>();
        for(Conversation conversation : oldQueue) {
            try {
            conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller()));
            } catch (Throwable t) {
                Bukkit.getLogger().log(Level.SEVERE, "Unexpected exception while abandoning a conversation", t);
            }
        }
    }
项目:Cauldron-Old    文件:ConversationTracker.java   
public synchronized boolean beginConversation(Conversation conversation) {
    if (!conversationQueue.contains(conversation)) {
        conversationQueue.addLast(conversation);
        if (conversationQueue.getFirst() == conversation) {
            conversation.begin();
            conversation.outputNextPrompt();
            return true;
        }
    }
    return true;
}
项目:Cauldron-Old    文件:ConversationTracker.java   
public synchronized void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) {
    if (!conversationQueue.isEmpty()) {
        if (conversationQueue.getFirst() == conversation) {
            conversation.abandon(details);
        }
        if (conversationQueue.contains(conversation)) {
            conversationQueue.remove(conversation);
        }
        if (!conversationQueue.isEmpty()) {
            conversationQueue.getFirst().outputNextPrompt();
        }
    }
}
项目:Cauldron-Old    文件:ConversationTracker.java   
public synchronized void abandonAllConversations() {

        LinkedList<Conversation> oldQueue = conversationQueue;
        conversationQueue = new LinkedList<Conversation>();
        for(Conversation conversation : oldQueue) {
            try {
            conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller()));
            } catch (Throwable t) {
                Bukkit.getLogger().log(Level.SEVERE, "Unexpected exception while abandoning a conversation", t);
            }
        }
    }
项目:Cauldron-Reloaded    文件:ConversationTracker.java   
public synchronized boolean beginConversation(Conversation conversation) {
    if (!conversationQueue.contains(conversation)) {
        conversationQueue.addLast(conversation);
        if (conversationQueue.getFirst() == conversation) {
            conversation.begin();
            conversation.outputNextPrompt();
            return true;
        }
    }
    return true;
}
项目:Cauldron-Reloaded    文件:ConversationTracker.java   
public synchronized void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) {
    if (!conversationQueue.isEmpty()) {
        if (conversationQueue.getFirst() == conversation) {
            conversation.abandon(details);
        }
        if (conversationQueue.contains(conversation)) {
            conversationQueue.remove(conversation);
        }
        if (!conversationQueue.isEmpty()) {
            conversationQueue.getFirst().outputNextPrompt();
        }
    }
}
项目:Cauldron-Reloaded    文件:ConversationTracker.java   
public synchronized void abandonAllConversations() {

        LinkedList<Conversation> oldQueue = conversationQueue;
        conversationQueue = new LinkedList<Conversation>();
        for(Conversation conversation : oldQueue) {
            try {
            conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller()));
            } catch (Throwable t) {
                Bukkit.getLogger().log(Level.SEVERE, "Unexpected exception while abandoning a conversation", t);
            }
        }
    }
项目:FFoKC    文件:ConversationTracker.java   
public synchronized boolean beginConversation(Conversation conversation) {
    if (!conversationQueue.contains(conversation)) {
        conversationQueue.addLast(conversation);
        if (conversationQueue.getFirst() == conversation) {
            conversation.begin();
            conversation.outputNextPrompt();
            return true;
        }
    }
    return true;
}
项目:FFoKC    文件:ConversationTracker.java   
public synchronized void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) {
    if (!conversationQueue.isEmpty()) {
        if (conversationQueue.getFirst() == conversation) {
            conversation.abandon(details);
        }
        if (conversationQueue.contains(conversation)) {
            conversationQueue.remove(conversation);
        }
        if (!conversationQueue.isEmpty()) {
            conversationQueue.getFirst().outputNextPrompt();
        }
    }
}
项目:FFoKC    文件:ConversationTracker.java   
public synchronized void abandonAllConversations() {

        LinkedList<Conversation> oldQueue = conversationQueue;
        conversationQueue = new LinkedList<Conversation>();
        for(Conversation conversation : oldQueue) {
            try {
            conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller()));
            } catch (Throwable t) {
                Bukkit.getLogger().log(Level.SEVERE, "Unexpected exception while abandoning a conversation", t);
            }
        }
    }
项目:CraftBukkit    文件:ConversationTracker.java   
public synchronized boolean beginConversation(Conversation conversation) {
    if (!conversationQueue.contains(conversation)) {
        conversationQueue.addLast(conversation);
        if (conversationQueue.getFirst() == conversation) {
            conversation.begin();
            conversation.outputNextPrompt();
            return true;
        }
    }
    return true;
}
项目:CraftBukkit    文件:ConversationTracker.java   
public synchronized void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) {
    if (!conversationQueue.isEmpty()) {
        if (conversationQueue.getFirst() == conversation) {
            conversation.abandon(details);
        }
        if (conversationQueue.contains(conversation)) {
            conversationQueue.remove(conversation);
        }
        if (!conversationQueue.isEmpty()) {
            conversationQueue.getFirst().outputNextPrompt();
        }
    }
}
项目:CraftBukkit    文件:ConversationTracker.java   
public synchronized void abandonAllConversations() {

        LinkedList<Conversation> oldQueue = conversationQueue;
        conversationQueue = new LinkedList<Conversation>();
        for (Conversation conversation : oldQueue) {
            try {
                conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller()));
            } catch (Throwable t) {
                Bukkit.getLogger().log(Level.SEVERE, "Unexpected exception while abandoning a conversation", t);
            }
        }
    }
项目:Craftbukkit    文件:ConversationTracker.java   
public synchronized boolean beginConversation(Conversation conversation) {
    if (!conversationQueue.contains(conversation)) {
        conversationQueue.addLast(conversation);
        if (conversationQueue.getFirst() == conversation) {
            conversation.begin();
            conversation.outputNextPrompt();
            return true;
        }
    }
    return true;
}
项目:Craftbukkit    文件:ConversationTracker.java   
public synchronized void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) {
    if (!conversationQueue.isEmpty()) {
        if (conversationQueue.getFirst() == conversation) {
            conversation.abandon(details);
        }
        if (conversationQueue.contains(conversation)) {
            conversationQueue.remove(conversation);
        }
        if (!conversationQueue.isEmpty()) {
            conversationQueue.getFirst().outputNextPrompt();
        }
    }
}