Class LureExpiredEvent

java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.lures.LureExpiredEvent
All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent

public class LureExpiredEvent extends net.neoforged.bus.api.Event implements net.neoforged.bus.api.ICancellableEvent
Event fired when a lure has completely expired. This occurs when the item damage of a lure reaches 128. A lure casing will be returned to the player if this event fires without being cancelled. The casing item stack can be modified in this event.

Cancelling this event will prevent the lure from being destroyed and will set the remaining item durability to 1. It will also prevent a lure casing from being given to the player.

Since:
January 12, 2020
  • Field Details

    • player

      public final net.minecraft.server.level.ServerPlayer player
      The player whose lure has expired.
    • party

      public final PlayerPartyStorage party
      The PlayerPartyStorage that the lure is housed in.
    • lureStack

      public final net.minecraft.world.item.ItemStack lureStack
      The item stack representing the lure.
    • lure

      public final LureItem lure
      The specific lure item.
    • casingStack

      public net.minecraft.world.item.ItemStack casingStack
      The item stack representing the casing that will be returned to the player afterwards. This can be modified.
  • Constructor Details

    • LureExpiredEvent

      public LureExpiredEvent(net.minecraft.server.level.ServerPlayer player)
  • Method Details