Class MailEvent.ReadMail
java.lang.Object
net.minecraftforge.eventbus.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
Modifier and TypeClassDescriptionstatic class
Fired after the player opens the screenstatic class
Fired 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
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe author of the mail (if sealed) pulled from the NBT of the item To edit this edit the {@link this#getItemStack()}'s NBT in the Pre eventnet.minecraft.world.item.ItemStack
The mail item stackgetText()
The text of the mail To edit this edit the {@link this#getItemStack()}'s NBT in the Pre eventboolean
isSealed()
If the mail is sealed To edit this edit the {@link this#getItemStack()}'s NBT in the Pre eventMethods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
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 {@link this#getItemStack()}'s NBT in the Pre event- Returns:
- The author
-
getText
The text of the mail To edit this edit the {@link this#getItemStack()}'s NBT in the Pre event- Returns:
- The text
-
isSealed
public boolean isSealed()If the mail is sealed To edit this edit the {@link this#getItemStack()}'s NBT in the Pre event- Returns:
- If it's sealed
-