Interface GameMailService

All Superinterfaces:
BaseService
All Known Implementing Classes:
NoOpGameMailService

public interface GameMailService extends BaseService
Game mail service interface for in-game mail system. This service provides cross-module mail functionality.

游戏内邮件服务接口。 此服务提供跨模块的邮件功能。

Version:
1.0.0
Author:
wisdomme
  • Method Details

    • sendMail

      boolean sendMail(UUID senderUuid, String senderName, String receiverName, String subject, String content)
      Send a simple text mail.

      发送简单文本邮件。

      Parameters:
      senderUuid - sender's UUID (can be null for system mail)
      发送者UUID(系统邮件可为null)
      senderName - sender's name
      发送者名称
      receiverName - receiver's name
      接收者名称
      subject - mail subject
      邮件主题
      content - mail content
      邮件内容
      Returns:
      true if sent successfully
      是否发送成功
    • sendMail

      boolean sendMail(UUID senderUuid, String senderName, String receiverName, String subject, String content, org.bukkit.inventory.ItemStack[] items)
      Send a mail with attachments.

      发送带附件的邮件。

      Parameters:
      senderUuid - sender's UUID (can be null for system mail)
      发送者UUID(系统邮件可为null)
      senderName - sender's name
      发送者名称
      receiverName - receiver's name
      接收者名称
      subject - mail subject
      邮件主题
      content - mail content
      邮件内容
      items - attached items
      附件物品
      Returns:
      true if sent successfully
      是否发送成功
    • sendSystemMail

      boolean sendSystemMail(String receiverName, String subject, String content)
      Send a system notification mail.

      发送系统通知邮件。

      Parameters:
      receiverName - receiver's name
      接收者名称
      subject - mail subject
      邮件主题
      content - mail content
      邮件内容
      Returns:
      true if sent successfully
      是否发送成功
    • getUnreadCount

      int getUnreadCount(UUID playerUuid)
      Get unread mail count for a player.

      获取玩家未读邮件数量。

      Parameters:
      playerUuid - player's UUID
      玩家UUID
      Returns:
      unread mail count
      未读邮件数量
    • isAvailable

      boolean isAvailable()
      Check if the mail service is available and functional.

      检查邮件服务是否可用。

      Returns:
      true if available
      是否可用
    • notifyNewMail

      void notifyNewMail(org.bukkit.entity.Player player)
      Notify a player about new mail.

      通知玩家有新邮件。

      Parameters:
      player - the player to notify
      要通知的玩家