Class MessageQueryHandler

java.lang.Object
com.winterhavenmc.library.messagebuilder.query.MessageQueryHandler
All Implemented Interfaces:
QueryHandler<MessageRecord>

public class MessageQueryHandler extends Object implements QueryHandler<MessageRecord>
Handles queries for message records from the current language file. The constructor takes the 'MESSAGES' configuration section as a parameter, and throws an exception if the provided configuration section is not the language file message section.
  • Constructor Details

    • MessageQueryHandler

      public MessageQueryHandler(SectionProvider sectionProvider)
      Class constructor
  • Method Details

    • getRecord

      public MessageRecord getRecord(RecordKey messageKey)
      Retrieve a message record from the language file for the provided key
      Specified by:
      getRecord in interface QueryHandler<MessageRecord>
      Parameters:
      messageKey - the MessageId of the message record to be retrieved
      Returns:
      the message record for the MessageId