Class NoOpGameMailService
java.lang.Object
com.ultikits.ultitools.services.impl.NoOpGameMailService
- All Implemented Interfaces:
BaseService,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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()Get service name, this name will appear in the console or in the game.intgetUnreadCount(UUID playerUuid) Get unread mail count for a player.intVersion number, used to compare the version number of the registered service, currently not in use.booleanCheck if the mail service is available and functional.voidnotifyNewMail(org.bukkit.entity.Player player) Notify a player about new mail.booleanSend a simple text mail.booleansendMail(UUID senderUuid, String senderName, String receiverName, String subject, String content, org.bukkit.inventory.ItemStack[] items) Send a mail with attachments.booleansendSystemMail(String receiverName, String subject, String content) Send a system notification mail.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ultikits.ultitools.interfaces.BaseService
getResourceFolderName
-
Constructor Details
-
NoOpGameMailService
public NoOpGameMailService()
-
-
Method Details
-
getName
Description copied from interface:BaseServiceGet service name, this name will appear in the console or in the game.获取服务的名称,此名称将会出现在控制台或者游戏中
- Specified by:
getNamein interfaceBaseService- Returns:
- Service name
服务的名称
-
getAuthor
- Specified by:
getAuthorin interfaceBaseService- Returns:
- Author name
作者名称
-
getVersion
public int getVersion()Description copied from interface:BaseServiceVersion number, used to compare the version number of the registered service, currently not in use.用于对比注册服务的版本号,目前没啥卵用嘿嘿嘿
- Specified by:
getVersionin interfaceBaseService- Returns:
- service version
服务版本号
-
sendMail
public boolean sendMail(UUID senderUuid, String senderName, String receiverName, String subject, String content) Description copied from interface:GameMailServiceSend a simple text mail.发送简单文本邮件。
- Specified by:
sendMailin interfaceGameMailService- 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:GameMailServiceSend a mail with attachments.发送带附件的邮件。
- Specified by:
sendMailin interfaceGameMailService- 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
Description copied from interface:GameMailServiceSend a system notification mail.发送系统通知邮件。
- Specified by:
sendSystemMailin interfaceGameMailService- Parameters:
receiverName- receiver's name
接收者名称subject- mail subject
邮件主题content- mail content
邮件内容- Returns:
- true if sent successfully
是否发送成功
-
getUnreadCount
Description copied from interface:GameMailServiceGet unread mail count for a player.获取玩家未读邮件数量。
- Specified by:
getUnreadCountin interfaceGameMailService- Parameters:
playerUuid- player's UUID
玩家UUID- Returns:
- unread mail count
未读邮件数量
-
isAvailable
public boolean isAvailable()Description copied from interface:GameMailServiceCheck if the mail service is available and functional.检查邮件服务是否可用。
- Specified by:
isAvailablein interfaceGameMailService- Returns:
- true if available
是否可用
-
notifyNewMail
public void notifyNewMail(org.bukkit.entity.Player player) Description copied from interface:GameMailServiceNotify a player about new mail.通知玩家有新邮件。
- Specified by:
notifyNewMailin interfaceGameMailService- Parameters:
player- the player to notify
要通知的玩家
-