Class MailEvent.SealMail

java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.MailEvent
com.pixelmonmod.pixelmon.api.events.MailEvent.SealMail
Direct Known Subclasses:
MailEvent.SealMail.Post, MailEvent.SealMail.Pre
Enclosing class:
MailEvent

public abstract static class MailEvent.SealMail extends MailEvent
Event fired when a player seals mail
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Fired just after the mail has been sealed This is not cancelable
    static class 
    Fired just before the mail is sealed Cancelling this will prevent it from being sealed (but not stop it from being edited)

    Nested 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

    Fields
    Modifier and Type
    Field
    Description
    protected String
     
    protected net.minecraft.world.item.ItemStack
     
    protected net.minecraft.world.item.ItemStack
     
    protected String
     

    Fields inherited from class com.pixelmonmod.pixelmon.api.events.MailEvent

    player
  • Constructor Summary

    Constructors
    Constructor
    Description
    SealMail(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.item.ItemStack openItemStack, net.minecraft.world.item.ItemStack closedItemStack, String text, String author)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The author of the sealed mail
    net.minecraft.world.item.ItemStack
    The open mail item stack taken from the player
    net.minecraft.world.item.ItemStack
    The sealed mail item stack given to the player
    The text written to the sealed mail

    Methods inherited from class com.pixelmonmod.pixelmon.api.events.MailEvent

    getPlayer

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • openItemStack

      protected net.minecraft.world.item.ItemStack openItemStack
    • closedItemStack

      protected net.minecraft.world.item.ItemStack closedItemStack
    • text

      protected String text
    • author

      protected String author
  • Constructor Details

    • SealMail

      public SealMail(@Nonnull net.minecraft.server.level.ServerPlayer player, net.minecraft.world.item.ItemStack openItemStack, net.minecraft.world.item.ItemStack closedItemStack, String text, String author)
  • Method Details

    • getOpenItemStack

      public net.minecraft.world.item.ItemStack getOpenItemStack()
      The open mail item stack taken from the player
      Returns:
      The open mail
    • getSealedItemStack

      public net.minecraft.world.item.ItemStack getSealedItemStack()
      The sealed mail item stack given to the player
      Returns:
      The sealed mail
    • getText

      public String getText()
      The text written to the sealed mail
      Returns:
      Written text
    • getAuthor

      public String getAuthor()
      The author of the sealed mail
      Returns:
      author