Interface IPlayerMailData


  • public interface IPlayerMailData
    Manages a player's mail inbox, including sending, removing, and querying mail.
    • Method Detail

      • hasMail

        boolean hasMail()
        Returns:
        true if the player has any mail.
      • addMail

        void addMail​(IPlayerMail mail)
        Adds mail to the player's inbox.
        Parameters:
        mail - the mail to add.
      • removeMail

        void removeMail​(IPlayerMail mail)
        Removes specific mail from the player's inbox.
        Parameters:
        mail - the mail to remove.
      • hasMail

        boolean hasMail​(IPlayerMail mail)
        Checks if the player has the specified mail.
        Parameters:
        mail - the mail to check.
        Returns:
        true if the mail exists in the inbox.
      • getAllMail

        IPlayerMail[] getAllMail()
        Returns:
        all mail in the player's inbox.
      • getUnreadMail

        IPlayerMail[] getUnreadMail()
        Returns:
        all unread mail in the player's inbox.
      • getReadMail

        IPlayerMail[] getReadMail()
        Returns:
        all read mail in the player's inbox.
      • getMailFrom

        IPlayerMail[] getMailFrom​(String sender)
        Returns all mail from the given sender.
        Parameters:
        sender - the sender name.
        Returns:
        an array of matching mail.