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

de.epiceric.shopchest.utils

## Class ClickType

- java.lang.Object
- - de.epiceric.shopchest.utils.ClickType

    public class ClickType
    extends Object

### Nested Class Summary

Nested Classes
`static class` `ClickType.EnumClickType`

### Constructor Summary

Constructors
Constructor and Description
`ClickType(ClickType.EnumClickType enumClickType)`
`ClickType(ClickType.EnumClickType enumClickType, org.bukkit.inventory.ItemStack product, double buyPrice, double sellPrice, Shop.ShopType shopType)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`double` `getBuyPrice()`
`ClickType.EnumClickType` `getClickType()`
`static ClickType` `getPlayerClickType(org.bukkit.OfflinePlayer player)` Gets the click type of a player
`org.bukkit.inventory.ItemStack` `getProduct()`
`double` `getSellPrice()`
`Shop.ShopType` `getShopType()`
`static void` `removePlayerClickType(org.bukkit.OfflinePlayer player)` Removes the click type from a player
`static void` `setPlayerClickType(org.bukkit.OfflinePlayer player, ClickType clickType)` Sets the click type of a player

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

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

### Constructor Detail

#### ClickType

    public ClickType(ClickType.EnumClickType enumClickType)

#### ClickType

    public ClickType(ClickType.EnumClickType enumClickType,
                     org.bukkit.inventory.ItemStack product,
                     double buyPrice,
                     double sellPrice,
                     Shop.ShopType shopType)

### Method Detail

#### getPlayerClickType

    public static ClickType getPlayerClickType(org.bukkit.OfflinePlayer player)

Gets the click type of a player

Parameters:
  `player` - Player whose click type should be gotten
Returns:
  The Player's click type or null if he doesn't have one

#### removePlayerClickType

    public static void removePlayerClickType(org.bukkit.OfflinePlayer player)

Removes the click type from a player

Parameters:
  `player` - Player to remove the click type from

#### setPlayerClickType

    public static void setPlayerClickType(org.bukkit.OfflinePlayer player,
                                          ClickType clickType)

Sets the click type of a player

Parameters:
  `player` - Player whose click type should be set
  `clickType` - Click type to set

#### getClickType

    public ClickType.EnumClickType getClickType()

Returns:
  Type of the click type

#### getProduct

    public org.bukkit.inventory.ItemStack getProduct()

Returns:
  If `getClickType()` returns `ClickType.EnumClickType.CREATE`, this returns the item, the player has hold in his hands, else null.

#### getBuyPrice

    public double getBuyPrice()

Returns:
  If `getClickType()` returns `ClickType.EnumClickType.CREATE`, this returns the buy price, the player has entered, else null.

#### getSellPrice

    public double getSellPrice()

Returns:
  If `getClickType()` returns `ClickType.EnumClickType.CREATE`, this returns the sell price, the player has entered, else null.

#### getShopType

    public Shop.ShopType getShopType()

Returns:
  If `getClickType()` returns `ClickType.EnumClickType.CREATE`, this returns the shop type, the player has entered, else null.