Class PlayerCollectItemInfoEvent

java.lang.Object
net.okocraft.box.api.event.BoxEvent
net.okocraft.box.api.event.player.PlayerEvent
net.okocraft.box.api.event.player.PlayerCollectItemInfoEvent

public class PlayerCollectItemInfoEvent extends PlayerEvent
A PlayerEvent called when the BoxPlayer collects item info through /box iteminfo.
  • Constructor Details

    • PlayerCollectItemInfoEvent

      public PlayerCollectItemInfoEvent(@NotNull @NotNull BoxPlayer boxPlayer, @NotNull @NotNull BoxItem item)
      The constructor of a PlayerCollectItemInfoEvent.
      Parameters:
      boxPlayer - the player of this event
      item - the BoxItem to collect information
  • Method Details

    • getItem

      @NotNull public @NotNull BoxItem getItem()
      Gets the BoxItem to collect information.
      Returns:
      the BoxItem to collect information
    • getInfo

      @NotNull public @NotNull @UnmodifiableView List<Component> getInfo()
      Returns the list of information of the BoxItem for the BoxPlayer.
      Returns:
      the list of information of the BoxItem for the BoxPlayer
    • addInfo

      public void addInfo(@NotNull @NotNull Component component)
      Adds information of the BoxItem.
      Parameters:
      component - the Component to represents information of the BoxItem
    • toDebugLog

      @NotNull public @NotNull String toDebugLog()
      Description copied from class: BoxEvent
      Creates the debug log from this event.
      Overrides:
      toDebugLog in class PlayerEvent
      Returns:
      the debug log
    • toString

      public String toString()
      Overrides:
      toString in class PlayerEvent