Class PlayerDuplicateKeyEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
wtf.choco.locksecurity.api.event.key.PlayerDuplicateKeyEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class PlayerDuplicateKeyEvent
extends org.bukkit.event.player.PlayerEvent
implements org.bukkit.event.Cancellable
Called when a player duplicates a smithed key in a crafting table.
- Since:
- 3.0.0
- Author:
- Parker Hawke - Choco
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description PlayerDuplicateKeyEvent(org.bukkit.entity.Player who, org.bukkit.inventory.ItemStack smithedKey, org.bukkit.inventory.ItemStack unsmithedKey, org.bukkit.inventory.ItemStack output)
-
Method Summary
Modifier and Type Method Description 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
getSmithedKey()
Get the smithed key to be duplicated.org.bukkit.inventory.ItemStack
getUnsmithedKey()
Get the unsmithed key to be consumed by the duplication.boolean
isCancelled()
void
setCancelled(boolean cancel)
void
setOutput(org.bukkit.inventory.ItemStack output)
Set the output of this duplication.
-
Constructor Details
-
PlayerDuplicateKeyEvent
public PlayerDuplicateKeyEvent(@NotNull org.bukkit.entity.Player who, @NotNull org.bukkit.inventory.ItemStack smithedKey, @NotNull org.bukkit.inventory.ItemStack unsmithedKey, @Nullable org.bukkit.inventory.ItemStack output)
-
-
Method Details
-
getSmithedKey
@NotNull public org.bukkit.inventory.ItemStack getSmithedKey()Get the smithed key to be duplicated.- Returns:
- the smithed key
-
getUnsmithedKey
@NotNull public org.bukkit.inventory.ItemStack getUnsmithedKey()Get the unsmithed key to be consumed by the duplication.- Returns:
- the unsmithed 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()
-