Package com.ultikits.ultitools.services
Interface GameMailService
- All Superinterfaces:
BaseService
- All Known Implementing Classes:
NoOpGameMailService
Game mail service interface for in-game mail system.
This service provides cross-module mail functionality.
游戏内邮件服务接口。 此服务提供跨模块的邮件功能。
- Version:
- 1.0.0
- Author:
- wisdomme
-
Method Summary
Modifier and TypeMethodDescriptionintgetUnreadCount(UUID playerUuid) Get unread mail count for a player.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 interface com.ultikits.ultitools.interfaces.BaseService
getAuthor, getName, getResourceFolderName, getVersion
-
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
Send a system notification mail.发送系统通知邮件。
- Parameters:
receiverName- receiver's name
接收者名称subject- mail subject
邮件主题content- mail content
邮件内容- Returns:
- true if sent successfully
是否发送成功
-
getUnreadCount
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
要通知的玩家
-