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

de.epiceric.shopchest.shop

## Class Shop

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

    public class Shop
    extends Object

### Nested Class Summary

Nested Classes
`static class` `Shop.ShopType`

### Constructor Summary

Constructors
Constructor and Description
`Shop(int id, ShopChest plugin, org.bukkit.OfflinePlayer vendor, org.bukkit.inventory.ItemStack product, org.bukkit.Location location, double buyPrice, double sellPrice, Shop.ShopType shopType)`
`Shop(ShopChest plugin, org.bukkit.OfflinePlayer vendor, org.bukkit.inventory.ItemStack product, org.bukkit.Location location, double buyPrice, double sellPrice, Shop.ShopType shopType)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `create(boolean showConsoleMessages)`
`double` `getBuyPrice()`
`Hologram` `getHologram()`
`int` `getID()`
`org.bukkit.inventory.InventoryHolder` `getInventoryHolder()`
`ShopItem` `getItem()`
`org.bukkit.Location` `getLocation()`
`org.bukkit.inventory.ItemStack` `getProduct()`
`double` `getSellPrice()`
`Shop.ShopType` `getShopType()`
`org.bukkit.OfflinePlayer` `getVendor()`
`boolean` `hasId()`
`boolean` `isCreated()`
`void` `removeHologram()` Removes the hologram of the shop
`void` `removeItem()` Removes the floating item of the shop
`void` `setId(int id)` Assign an ID to the shop.
`void` `updateHologramText()`

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

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

### Constructor Detail

#### Shop

    public Shop(int id,
                ShopChest plugin,
                org.bukkit.OfflinePlayer vendor,
                org.bukkit.inventory.ItemStack product,
                org.bukkit.Location location,
                double buyPrice,
                double sellPrice,
                Shop.ShopType shopType)

#### Shop

    public Shop(ShopChest plugin,
                org.bukkit.OfflinePlayer vendor,
                org.bukkit.inventory.ItemStack product,
                org.bukkit.Location location,
                double buyPrice,
                double sellPrice,
                Shop.ShopType shopType)

### Method Detail

#### create

    public boolean create(boolean showConsoleMessages)

#### removeHologram

    public void removeHologram()

Removes the hologram of the shop

#### removeItem

    public void removeItem()

Removes the floating item of the shop

#### updateHologramText

    public void updateHologramText()

#### hasId

    public boolean hasId()

Returns:
  Whether an ID has been assigned to the shop

#### setId

    public void setId(int id)

Assign an ID to the shop.
Only works for the first time!

#### isCreated

    public boolean isCreated()

Returns:
  Whether the shop has already been created

#### getID

    public int getID()

Returns:
  The ID of the shop

#### getVendor

    public org.bukkit.OfflinePlayer getVendor()

Returns:
  Vendor of the shop; probably the creator of it

#### getProduct

    public org.bukkit.inventory.ItemStack getProduct()

Returns:
  Product the shop sells (or buys)

#### getLocation

    public org.bukkit.Location getLocation()

Returns:
  Location of (one of) the shop's chest

#### getBuyPrice

    public double getBuyPrice()

Returns:
  Buy price of the shop

#### getSellPrice

    public double getSellPrice()

Returns:
  Sell price of the shop

#### getShopType

    public Shop.ShopType getShopType()

Returns:
  Type of the shop

#### getHologram

    public Hologram getHologram()

Returns:
  Hologram of the shop

#### getItem

    public ShopItem getItem()

Returns:
  Floating `ShopItem` of the shop

#### getInventoryHolder

    public org.bukkit.inventory.InventoryHolder getInventoryHolder()

Returns:
  `InventoryHolder` of the shop or null if the shop has no chest.