public abstract static class MailEvent.ReadMail extends MailEvent
| Modifier and Type | Class and Description |
|---|---|
static class |
MailEvent.ReadMail.Post
Fired after the player opens the screen
|
static class |
MailEvent.ReadMail.Pre
Fired before the open screen packet is sent
Cancelling will stop the player from opening the screen
|
MailEvent.EditMail, MailEvent.ReadMail, MailEvent.SealMail| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
author |
protected net.minecraft.item.ItemStack |
itemStack |
protected boolean |
sealed |
protected java.lang.String |
text |
| Constructor and Description |
|---|
ReadMail(net.minecraft.entity.player.ServerPlayerEntity player,
net.minecraft.item.ItemStack itemStack,
java.lang.String author,
java.lang.String text,
boolean sealed) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAuthor()
The author of the mail (if sealed) pulled from the NBT of the item
To edit this edit the
this#getItemStack()'s NBT in the Pre event |
net.minecraft.item.ItemStack |
getItemStack()
The mail item stack
|
java.lang.String |
getText()
The text of the mail
To edit this edit the
this#getItemStack()'s NBT in the Pre event |
boolean |
isSealed()
If the mail is sealed
To edit this edit the
this#getItemStack()'s NBT in the Pre event |
protected net.minecraft.item.ItemStack itemStack
protected final java.lang.String author
protected final java.lang.String text
protected final boolean sealed
public ReadMail(@Nonnull
net.minecraft.entity.player.ServerPlayerEntity player,
net.minecraft.item.ItemStack itemStack,
java.lang.String author,
java.lang.String text,
boolean sealed)
public net.minecraft.item.ItemStack getItemStack()
@Nullable public java.lang.String getAuthor()
this#getItemStack()'s NBT in the Pre eventpublic java.lang.String getText()
this#getItemStack()'s NBT in the Pre eventpublic boolean isSealed()
this#getItemStack()'s NBT in the Pre event