Package de.themoep.ShowItem.api.event
Class ViewInventoryEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
de.themoep.ShowItem.api.event.ViewInventoryEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class ViewInventoryEvent
extends org.bukkit.event.player.PlayerEvent
implements org.bukkit.event.Cancellable
Event that is called when a player views an inventory shown by another player.
Useful for plugins that provide custom inventory contents or cancel the viewing.
-
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
Get the UUID of the player that sent the inventoryGet the name of the player that sent the inventoryGet the inventory data that is being shown to the playerboolean
void
setCancelled
(boolean cancelled) void
setShownData
(InvData invData) Set the inventory data that is being shown to the playerMethods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
ViewInventoryEvent
-
-
Method Details
-
getShownData
Get the inventory data that is being shown to the player- Returns:
- The inventory data
-
setShownData
Set the inventory data that is being shown to the player- Parameters:
invData
- The inventory data
-
getSenderId
Get the UUID of the player that sent the inventory- Returns:
- The player that sent the inventory
-
getSenderName
Get the name of the player that sent the inventory- Returns:
- The name of the player that sent the inventory
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList() -
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-