Class ViewItemEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
de.themoep.ShowItem.api.event.ViewItemEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class ViewItemEvent extends org.bukkit.event.player.PlayerEvent implements org.bukkit.event.Cancellable
Event that is called when a player views an item shown by another player in the GUI.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Field Summary

    Fields inherited from class org.bukkit.event.player.PlayerEvent

    player
  • Constructor Summary

    Constructors
    Constructor
    Description
    ViewItemEvent(org.bukkit.entity.Player who, org.bukkit.inventory.ItemStack itemStack)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
     
    org.bukkit.event.HandlerList
     
    org.bukkit.inventory.ItemStack
    Get the item that is being shown to the player
    boolean
     
    void
    setCancelled(boolean cancelled)
     
    void
    setShownItem(org.bukkit.inventory.ItemStack itemStack)
    Set the item that is being shown to the player

    Methods inherited from class org.bukkit.event.player.PlayerEvent

    getPlayer

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

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

    • ViewItemEvent

      public ViewItemEvent(org.bukkit.entity.Player who, org.bukkit.inventory.ItemStack itemStack)
  • Method Details

    • getShownItem

      public org.bukkit.inventory.ItemStack getShownItem()
      Get the item that is being shown to the player
      Returns:
      The item
    • setShownItem

      public void setShownItem(org.bukkit.inventory.ItemStack itemStack)
      Set the item that is being shown to the player
      Parameters:
      itemStack - The item
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable