Class InactivityConversationCanceller

java.lang.Object
org.bukkit.conversations.InactivityConversationCanceller
All Implemented Interfaces:
Cloneable, ConversationCanceller

@Deprecated(forRemoval=true) public class InactivityConversationCanceller extends Object implements ConversationCanceller
Deprecated, for removal: This API element is subject to removal in a future version.
The conversation API has been deprecated for removal. This system does not support component based messages and has been slowly losing functionality over the years as Minecraft has changed that this API can not adapt to. It is recommended you instead manually listen to the AsyncChatEvent or alternatively using Dialog to get user input.
An InactivityConversationCanceller will cancel a Conversation after a period of inactivity by the user.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Conversation
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected Plugin
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    InactivityConversationCanceller(@NotNull Plugin plugin, int timeoutSeconds)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates an InactivityConversationCanceller.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Cancels a conversation based on user input.
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Subclasses of InactivityConversationCanceller can override this method to take additional actions when the inactivity timer abandons the conversation.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Allows the ConversationFactory to duplicate this ConversationCanceller when creating a new Conversation.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the conversation this ConversationCanceller can optionally cancel.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • plugin

      protected Plugin plugin
      Deprecated, for removal: This API element is subject to removal in a future version.
    • timeoutSeconds

      protected int timeoutSeconds
      Deprecated, for removal: This API element is subject to removal in a future version.
    • conversation

      protected Conversation conversation
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • InactivityConversationCanceller

      public InactivityConversationCanceller(@NotNull @NotNull Plugin plugin, int timeoutSeconds)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates an InactivityConversationCanceller.
      Parameters:
      plugin - The owning plugin.
      timeoutSeconds - The number of seconds of inactivity to wait.
  • Method Details

    • setConversation

      public void setConversation(@NotNull @NotNull Conversation conversation)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ConversationCanceller
      Sets the conversation this ConversationCanceller can optionally cancel.
      Specified by:
      setConversation in interface ConversationCanceller
      Parameters:
      conversation - A conversation.
    • cancelBasedOnInput

      public boolean cancelBasedOnInput(@NotNull @NotNull ConversationContext context, @NotNull @NotNull String input)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ConversationCanceller
      Cancels a conversation based on user input.
      Specified by:
      cancelBasedOnInput in interface ConversationCanceller
      Parameters:
      context - Context information about the conversation.
      input - The input text from the user.
      Returns:
      True to cancel the conversation, False otherwise.
    • clone

      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ConversationCanceller
      Allows the ConversationFactory to duplicate this ConversationCanceller when creating a new Conversation.

      Implementing this method should reset any internal object state.

      Specified by:
      clone in interface ConversationCanceller
      Overrides:
      clone in class Object
      Returns:
      A clone.
    • cancelling

      protected void cancelling(@NotNull @NotNull Conversation conversation)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Subclasses of InactivityConversationCanceller can override this method to take additional actions when the inactivity timer abandons the conversation.
      Parameters:
      conversation - The conversation being abandoned.