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.
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)
      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)
      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
      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