org.bukkit.conversations.ConversationFactory Java Examples

The following examples show how to use org.bukkit.conversations.ConversationFactory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NameFactory.java    From SonarPet with GNU General Public License v3.0 5 votes vote down vote up
public static void askForName(Conversable whom, IPet pet, boolean admin) {
    new ConversationFactory(EchoPet.getPlugin())
            .withModality(true)
            .withLocalEcho(false)
            .withPrefix(new NameConversationPrefix())
            .withTimeout(90)
            .withFirstPrompt(new NamePrompt(pet, admin))
            .withEscapeSequence("exit")
            .withEscapeSequence("quit")
            .buildConversation(whom).begin();
}
 
Example #2
Source File: InputFactory.java    From HoloAPI with GNU General Public License v3.0 5 votes vote down vote up
public static ConversationFactory buildBasicConversation() {
    return new ConversationFactory(HoloAPI.getCore())
            .withModality(true)
            .withLocalEcho(false)
            .withPrefix(new InputConversationPrefix())
            .withTimeout(90)
            .withEscapeSequence("exit");
}
 
Example #3
Source File: NameFactory.java    From EchoPet with GNU General Public License v3.0 5 votes vote down vote up
public static void askForName(Conversable whom, IPet pet, boolean admin) {
    new ConversationFactory(EchoPet.getPlugin())
            .withModality(true)
            .withLocalEcho(false)
            .withPrefix(new NameConversationPrefix())
            .withTimeout(90)
            .withFirstPrompt(new NamePrompt(pet, admin))
            .withEscapeSequence("exit")
            .withEscapeSequence("quit")
            .buildConversation(whom).begin();
}
 
Example #4
Source File: UHPlugin.java    From KTP with GNU General Public License v3.0 4 votes vote down vote up
public ConversationFactory getConversationFactory(String string) {
	if (cfs.containsKey(string)) return cfs.get(string);
	return null;
}