Package noppes.npcs.api.handler
Interface IPlayerMailData
-
public interface IPlayerMailDataManages a player's mail inbox, including sending, removing, and querying mail.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddMail(IPlayerMail mail)Adds mail to the player's inbox.IPlayerMail[]getAllMail()IPlayerMail[]getMailFrom(String sender)Returns all mail from the given sender.IPlayerMail[]getReadMail()IPlayerMail[]getUnreadMail()booleanhasMail()booleanhasMail(IPlayerMail mail)Checks if the player has the specified mail.voidremoveMail(IPlayerMail mail)Removes specific mail from the player's inbox.
-
-
-
Method Detail
-
hasMail
boolean hasMail()
- Returns:
- true if the player has any mail.
-
addMail
void addMail(IPlayerMail mail)
Adds mail to the player's inbox.- Parameters:
mail- the mail to add.
-
removeMail
void removeMail(IPlayerMail mail)
Removes specific mail from the player's inbox.- Parameters:
mail- the mail to remove.
-
hasMail
boolean hasMail(IPlayerMail mail)
Checks if the player has the specified mail.- Parameters:
mail- the mail to check.- Returns:
- true if the mail exists in the inbox.
-
getAllMail
IPlayerMail[] getAllMail()
- Returns:
- all mail in the player's inbox.
-
getUnreadMail
IPlayerMail[] getUnreadMail()
- Returns:
- all unread mail in the player's inbox.
-
getReadMail
IPlayerMail[] getReadMail()
- Returns:
- all read mail in the player's inbox.
-
getMailFrom
IPlayerMail[] getMailFrom(String sender)
Returns all mail from the given sender.- Parameters:
sender- the sender name.- Returns:
- an array of matching mail.
-
-