Class AnvilGUI.StateSnapshot

java.lang.Object
net.wesjd.anvilgui.AnvilGUI.StateSnapshot
Enclosing class:
AnvilGUI

public static final class AnvilGUI.StateSnapshot extends Object
Represents a snapshot of the state of an AnvilGUI
  • Constructor Summary

    Constructors
    Constructor
    Description
    StateSnapshot(org.bukkit.inventory.ItemStack leftItem, org.bukkit.inventory.ItemStack rightItem, org.bukkit.inventory.ItemStack outputItem, org.bukkit.entity.Player player)
    The event parameter constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.inventory.ItemStack
    It returns the item in the left combine slot of the gui
    org.bukkit.inventory.ItemStack
    It returns the output item that would have been the result by combining the left and right one
    org.bukkit.entity.Player
    It returns the player that clicked onto the output slot
    org.bukkit.inventory.ItemStack
    It returns the item in the right combine slot of the gui
    It returns the text the player typed into the rename field

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • StateSnapshot

      public StateSnapshot(org.bukkit.inventory.ItemStack leftItem, org.bukkit.inventory.ItemStack rightItem, org.bukkit.inventory.ItemStack outputItem, org.bukkit.entity.Player player)
      The event parameter constructor
      Parameters:
      leftItem - The left item in the combine slot of the anvilGUI
      rightItem - The right item in the combine slot of the anvilGUI
      outputItem - The item that would have been outputted, when the items would have been combined
      player - The player that clicked the output slot
  • Method Details

    • getLeftItem

      public org.bukkit.inventory.ItemStack getLeftItem()
      It returns the item in the left combine slot of the gui
      Returns:
      The leftItem
    • getRightItem

      public org.bukkit.inventory.ItemStack getRightItem()
      It returns the item in the right combine slot of the gui
      Returns:
      The rightItem
    • getOutputItem

      public org.bukkit.inventory.ItemStack getOutputItem()
      It returns the output item that would have been the result by combining the left and right one
      Returns:
      The outputItem
    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      It returns the player that clicked onto the output slot
      Returns:
      The player
    • getText

      public String getText()
      It returns the text the player typed into the rename field
      Returns:
      The text of the rename field