Interface ChatManager

All Known Implementing Classes:
BukkitChatManager

public interface ChatManager
To manage all the things of DynamicChat
  • Method Details

    • getChannel

      Channel getChannel(String name)
      Get the channel by name
      Parameters:
      name - channel name
      Returns:
      channel
    • getChannels

      List<? extends Channel> getChannels()
      Get all channels
      Returns:
      all channels
    • getTemporaryChannels

      List<? extends TemporaryChannel> getTemporaryChannels()
      Get all temporary channels
      Returns:
      all temporary channels
    • getGlobal

      Channel getGlobal()
      Get the global channel
      Returns:
      global channel
    • createTemporaryChannel

      TemporaryChannel createTemporaryChannel(@Nullable @Nullable String displayName, @Nullable @Nullable String format)
      Create a temporary channel
      Parameters:
      displayName - the display name
      format - chat format
      Returns:
      the temporary channel
    • registerButton

      void registerButton(int index, MessageButton button)
      Register the button showing when click the message
      Parameters:
      index - the index, don't be in [0, 10], this is the range of the buttons of official extensions
      button - button object
    • getButtons

      Map<Integer,? extends MessageButton> getButtons()
      Get all the registered buttons
      Returns:
      (index, button object)
    • getButtonMaxIndex

      int getButtonMaxIndex()
      Because the index of buttons can be customized, this will return the max index of the registered buttons
      Returns:
      the max index
    • languageFollowClient

      boolean languageFollowClient()
      To check whether language should follow the client
      Returns:
      status
    • getDefaultLanguage

      String getDefaultLanguage()
      Get default language name
      Returns:
      default language
    • getIndex

      int getIndex(MuteMessage message)
      Get the index of the message
      Parameters:
      message - message
      Returns:
      the index
    • getMessageByIndex

      MuteMessage getMessageByIndex(int index)
      Get a message by index
      Parameters:
      index - the index of the message
      Returns:
      the message
    • getMessageById

      MuteMessage getMessageById(String id)
      Get the message by id
      Parameters:
      id - the id of the message
      Returns:
      the message
    • getContext

      Context getContext(int startIndex, int endIndex)
      Get context
      Parameters:
      startIndex - start index
      endIndex - end index
      Returns:
      the context
    • getContext

      Context getContext(MuteMessage startMessage, int amount)
      Get the context start from a message object
      Parameters:
      startMessage - start message
      amount - the amount
      Returns:
      the context
    • recordedMessages

      int recordedMessages()
      To get how many messages that have been stored
      Returns:
      the amount of the stored messages
    • createTime

      Time createTime(int years, int months, int weeks, int days, int hours, int minutes, int seconds)
      Create a time obejct
      Parameters:
      years - yesrs
      months - months
      weeks - weeks
      days - days
      hours - hours
      minutes - minutes
      seconds - seconds
      Returns:
      a time object
    • createTime

      Time createTime(long seconds)
      To create time from seconds long
      Parameters:
      seconds - seconds not milliseconds
      Returns:
      a time objects
    • parseTime

      Time parseTime(String timeString)
      Parse time from string
      Parameters:
      timeString - e.g. 1y2mo3wk4d5h6min7s
      Returns:
      a time object
    • getBanIPManager

      BanIPManager getBanIPManager()
      Get ban ip manager to ban or unban ip
      Returns:
      BanIPManager