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

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

    org.bukkit.event.Event.Result
  • 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.

    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

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface org.bukkit.event.Cancellable
    • isCancelled

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

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

      @NotNull public static org.bukkit.event.HandlerList getHandlerList()