Class PlayerMergeKeyEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
wtf.choco.locksecurity.api.event.key.PlayerMergeKeyEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class PlayerMergeKeyEvent
extends org.bukkit.event.player.PlayerEvent
implements org.bukkit.event.Cancellable
Called when a player merges two smithed keys in a crafting table.
- Since:
- 3.0.0
- Author:
- Parker Hawke - Choco
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description PlayerMergeKeyEvent(org.bukkit.entity.Player who, org.bukkit.inventory.ItemStack firstKey, org.bukkit.inventory.ItemStack secondKey, org.bukkit.inventory.ItemStack output)
-
Method Summary
Modifier and Type Method Description org.bukkit.inventory.ItemStack
getFirstKey()
Get the first smithed key in the crafting inventory.static org.bukkit.event.HandlerList
getHandlerList()
org.bukkit.event.HandlerList
getHandlers()
org.bukkit.inventory.ItemStack
getOutput()
Get the output of this duplication.org.bukkit.inventory.ItemStack
getSecondKey()
Get the second smithed key in the crafting inventory.boolean
isCancelled()
void
setCancelled(boolean cancel)
void
setOutput(org.bukkit.inventory.ItemStack output)
Set the output of this duplication.
-
Constructor Details
-
PlayerMergeKeyEvent
public PlayerMergeKeyEvent(@NotNull org.bukkit.entity.Player who, @NotNull org.bukkit.inventory.ItemStack firstKey, @NotNull org.bukkit.inventory.ItemStack secondKey, @Nullable org.bukkit.inventory.ItemStack output)
-
-
Method Details
-
getFirstKey
@NotNull public org.bukkit.inventory.ItemStack getFirstKey()Get the first smithed key in the crafting inventory.- Returns:
- the first smithed key
-
getSecondKey
@NotNull public org.bukkit.inventory.ItemStack getSecondKey()Get the second smithed key in the crafting inventory.- Returns:
- the second smithed key
-
setOutput
public void setOutput(@Nullable org.bukkit.inventory.ItemStack output)Set the output of this duplication.- Parameters:
output
- the output
-
getOutput
@Nullable public org.bukkit.inventory.ItemStack getOutput()Get the output of this duplication.- Returns:
- the output
-
setCancelled
public void setCancelled(boolean cancel)- Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
getHandlers
@NotNull public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
@NotNull public static org.bukkit.event.HandlerList getHandlerList()
-