Class NoOpGameMailService

java.lang.Object
com.ultikits.ultitools.services.impl.NoOpGameMailService
All Implemented Interfaces:
BaseService, GameMailService

public class NoOpGameMailService extends Object implements GameMailService
No-op implementation of GameMailService. Used as a fallback when no mail module is loaded. All operations return false/0 indicating unavailable.

GameMailService 的空实现。 当没有加载邮件模块时作为兜底使用。 所有操作返回 false/0 表示不可用。

Version:
1.0.0
Author:
wisdomme
  • Constructor Details

    • NoOpGameMailService

      public NoOpGameMailService()
  • Method Details

    • getName

      public String getName()
      Description copied from interface: BaseService
      Get service name, this name will appear in the console or in the game.

      获取服务的名称,此名称将会出现在控制台或者游戏中

      Specified by:
      getName in interface BaseService
      Returns:
      Service name
      服务的名称
    • getAuthor

      public String getAuthor()
      Specified by:
      getAuthor in interface BaseService
      Returns:
      Author name
      作者名称
    • getVersion

      public int getVersion()
      Description copied from interface: BaseService
      Version number, used to compare the version number of the registered service, currently not in use.

      用于对比注册服务的版本号,目前没啥卵用嘿嘿嘿

      Specified by:
      getVersion in interface BaseService
      Returns:
      service version
      服务版本号
    • sendMail

      public boolean sendMail(UUID senderUuid, String senderName, String receiverName, String subject, String content)
      Description copied from interface: GameMailService
      Send a simple text mail.

      发送简单文本邮件。

      Specified by:
      sendMail in interface GameMailService
      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

      public boolean sendMail(UUID senderUuid, String senderName, String receiverName, String subject, String content, org.bukkit.inventory.ItemStack[] items)
      Description copied from interface: GameMailService
      Send a mail with attachments.

      发送带附件的邮件。

      Specified by:
      sendMail in interface GameMailService
      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

      public boolean sendSystemMail(String receiverName, String subject, String content)
      Description copied from interface: GameMailService
      Send a system notification mail.

      发送系统通知邮件。

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

      public int getUnreadCount(UUID playerUuid)
      Description copied from interface: GameMailService
      Get unread mail count for a player.

      获取玩家未读邮件数量。

      Specified by:
      getUnreadCount in interface GameMailService
      Parameters:
      playerUuid - player's UUID
      玩家UUID
      Returns:
      unread mail count
      未读邮件数量
    • isAvailable

      public boolean isAvailable()
      Description copied from interface: GameMailService
      Check if the mail service is available and functional.

      检查邮件服务是否可用。

      Specified by:
      isAvailable in interface GameMailService
      Returns:
      true if available
      是否可用
    • notifyNewMail

      public void notifyNewMail(org.bukkit.entity.Player player)
      Description copied from interface: GameMailService
      Notify a player about new mail.

      通知玩家有新邮件。

      Specified by:
      notifyNewMail in interface GameMailService
      Parameters:
      player - the player to notify
      要通知的玩家