Class MailEvent.ReadMail
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.MailEvent
com.pixelmonmod.pixelmon.api.events.MailEvent.ReadMail
- Direct Known Subclasses:
MailEvent.ReadMail.Post,MailEvent.ReadMail.Pre
- Enclosing class:
MailEvent
Event fired when a player interacts with the mail item and opens it to read (or edit) it
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFired after the player opens the screenstatic classFired before the open screen packet is sent Cancelling will stop the player from opening the screenNested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.events.MailEvent
MailEvent.EditMail, MailEvent.ReadMail, MailEvent.SealMail -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe author of the mail (if sealed) pulled from the NBT of the item To edit this edit the}'s NBT in the Pre eventinvalid @link
{@link this#getItemStack()net.minecraft.world.item.ItemStackThe mail item stackgetText()The text of the mail To edit this edit the}'s NBT in the Pre eventinvalid @link
{@link this#getItemStack()booleanisSealed()If the mail is sealed To edit this edit the}'s NBT in the Pre eventinvalid @link
{@link this#getItemStack()
-
Field Details
-
itemStack
protected net.minecraft.world.item.ItemStack itemStack -
author
-
text
-
sealed
protected final boolean sealed
-
-
Constructor Details
-
ReadMail
-
-
Method Details
-
getItemStack
public net.minecraft.world.item.ItemStack getItemStack()The mail item stack- Returns:
- The mail
-
getAuthor
The author of the mail (if sealed) pulled from the NBT of the item To edit this edit the}'s NBT in the Pre eventinvalid @link
{@link this#getItemStack()- Returns:
- The author
-
getText
The text of the mail To edit this edit the}'s NBT in the Pre eventinvalid @link
{@link this#getItemStack()- Returns:
- The text
-
isSealed
public boolean isSealed()If the mail is sealed To edit this edit the}'s NBT in the Pre eventinvalid @link
{@link this#getItemStack()- Returns:
- If it's sealed
-