# ShopItem (ShopChest 1.12 API)
Date: 2017-06-08

de.epiceric.shopchest.shop

## Class ShopItem

- java.lang.Object
- - de.epiceric.shopchest.shop.ShopItem

    public class ShopItem
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`ShopItem(ShopChest plugin, org.bukkit.inventory.ItemStack itemStack, org.bukkit.Location location)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Object` `getEntityItem()`
`org.bukkit.inventory.ItemStack` `getItemStack()`
`org.bukkit.Location` `getLocation()`
`boolean` `isVisible(org.bukkit.entity.Player p)`
`void` `remove()`
`void` `resetForPlayer(org.bukkit.entity.Player p)` Respawns the item at the set location for a player
`void` `setVisible(org.bukkit.entity.Player p, boolean visible)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ShopItem

    public ShopItem(ShopChest plugin,
                    org.bukkit.inventory.ItemStack itemStack,
                    org.bukkit.Location location)

### Method Detail

#### remove

    public void remove()

#### resetForPlayer

    public void resetForPlayer(org.bukkit.entity.Player p)

Respawns the item at the set location for a player

Parameters:
  `p` - Player, for which the item should be reset

#### isVisible

    public boolean isVisible(org.bukkit.entity.Player p)

#### setVisible

    public void setVisible(org.bukkit.entity.Player p,
                           boolean visible)

#### getLocation

    public org.bukkit.Location getLocation()

Returns:
  Clone of the location, where the shop item should be (it could have been moved by something, even though it shouldn't) To get the exact location, use reflection and extract the location of the `EntityItem` which you can get in `getEntityItem()`.

#### getEntityItem

    public Object getEntityItem()

Returns:
  `net.minecraft.server.[VERSION].EntityItem`

#### getItemStack

    public org.bukkit.inventory.ItemStack getItemStack()

Returns:
  A clone of this Item's `ItemStack`