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)senderName- sender's namereceiverName- receiver's namesubject- mail subjectcontent- 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)senderName- sender's namereceiverName- receiver's namesubject- mail subjectcontent- mail contentitems- attached items- Returns:
- true if sent successfully
-
sendSystemMail
Send a system notification mail.- Parameters:
receiverName- receiver's namesubject- mail subjectcontent- mail content- Returns:
- true if sent successfully
-
getUnreadCount
Get unread mail count for a player.- Parameters:
playerUuid- player's 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
-