Class InventoryClickEvent
java.lang.Object
org.bukkit.event.Event
nl.mtvehicles.core.infrastructure.models.MTVEvent
nl.mtvehicles.core.events.inventory.InventoryClickEvent
- All Implemented Interfaces:
HasInventory
,IsCancellable
On inventory click
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Field Summary
-
Constructor Summary
ConstructorDescriptionInventoryClickEvent(InventoryTitle title)
Default constructor with the event-inventory's title -
Method Summary
Modifier and TypeMethodDescriptionint
Get the number of slot player has clicked (starts with 0)getTitle()
Get the title of the inventory player has clicked invoid
setCancelled(boolean cancelled)
Sets the cancellation state of this event.void
setClickedSlot(int clickedSlot)
Set the number of slot which will be used by the plugin (slots start with 0)Methods inherited from class nl.mtvehicles.core.infrastructure.models.MTVEvent
call, getHandlerList, getHandlers, getPlayer, isCancelled, setPlayer
Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
InventoryClickEvent
Default constructor with the event-inventory's title- Parameters:
title
- Event-inventory's title
-
-
Method Details
-
setCancelled
public void setCancelled(boolean cancelled)Description copied from interface:IsCancellable
Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
setCancelled
in interfaceIsCancellable
- Parameters:
cancelled
- true if you wish to cancel this event
-
getClickedSlot
public int getClickedSlot()Get the number of slot player has clicked (starts with 0)- Returns:
- Number of clicked slot
-
setClickedSlot
public void setClickedSlot(int clickedSlot)Set the number of slot which will be used by the plugin (slots start with 0)- Parameters:
clickedSlot
- New number of clicked slot
-
getTitle
Description copied from interface:HasInventory
Get the title of the inventory player has clicked in- Specified by:
getTitle
in interfaceHasInventory
- Returns:
- Inventory title
- See Also:
InventoryTitle.getStringTitle()
-