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

de.epiceric.shopchest

## Class ShopChest

- java.lang.Object
- - org.bukkit.plugin.PluginBase
  - - org.bukkit.plugin.java.JavaPlugin
    - - de.epiceric.shopchest.ShopChest

All Implemented Interfaces:
  org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

    public class ShopChest
    extends org.bukkit.plugin.java.JavaPlugin

### Constructor Summary

Constructors
Constructor and Description
`ShopChest()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `debug(String message)` Print a message to the /plugins/ShopChest/debug.txt file
`void` `debug(Throwable throwable)` Print a `Throwable`'s stacktrace to the /plugins/ShopChest/debug.txt file
`String` `getDownloadLink()`
`net.milkbowl.vault.economy.Economy` `getEconomy()`
`me.ryanhamshire.GriefPrevention.GriefPrevention` `getGriefPrevention()`
`HologramFormat` `getHologramFormat()`
`static ShopChest` `getInstance()`
`String` `getLatestVersion()`
`Config` `getShopChestConfig()`
`ShopCommand` `getShopCommand()`
`Database` `getShopDatabase()`
`ShopUtils` `getShopUtils()`
`ShopUpdater` `getUpdater()`
`us.talabrek.ultimateskyblock.api.uSkyBlockAPI` `getUSkyBlock()`
`com.sk89q.worldguard.bukkit.WorldGuardPlugin` `getWorldGuard()`
`boolean` `hasAreaShop()`
`boolean` `hasASkyBlock()`
`boolean` `hasAuthMe()`
`boolean` `hasGriefPrevention()`
`boolean` `hasIslandWorld()`
`boolean` `hasPlotSquared()`
`boolean` `hasTowny()`
`boolean` `hasUSkyBlock()`
`boolean` `hasWorldGuard()`
`boolean` `isUpdateNeeded()`
`void` `onDisable()`
`void` `onEnable()`
`void` `onLoad()`
`void` `setDownloadLink(String downloadLink)` Set the download Link of the latest version (will return null if not checked or if no update is available)
`void` `setLatestVersion(String latestVersion)` Set the latest version
`void` `setUpdateNeeded(boolean isUpdateNeeded)` Set whether an update is needed
`void` `setUpdater(ShopUpdater updater)` Set the `ShopUpdater` that schedules hologram and item updates

### Methods inherited from class org.bukkit.plugin.java.JavaPlugin

`getClassLoader, getCommand, getConfig, getDataFolder, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onCommand, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString`

### Methods inherited from class org.bukkit.plugin.PluginBase

`equals, getName, hashCode`

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### ShopChest

    public ShopChest()

### Method Detail

#### getInstance

    public static ShopChest getInstance()

Returns:
  An instance of ShopChest

#### onLoad

    public void onLoad()

Specified by:
  `onLoad` in interface `org.bukkit.plugin.Plugin`
Overrides:
  `onLoad` in class `org.bukkit.plugin.java.JavaPlugin`

#### onEnable

    public void onEnable()

Specified by:
  `onEnable` in interface `org.bukkit.plugin.Plugin`
Overrides:
  `onEnable` in class `org.bukkit.plugin.java.JavaPlugin`

#### onDisable

    public void onDisable()

Specified by:
  `onDisable` in interface `org.bukkit.plugin.Plugin`
Overrides:
  `onDisable` in class `org.bukkit.plugin.java.JavaPlugin`

#### debug

    public void debug(String message)

Print a message to the /plugins/ShopChest/debug.txt file

Parameters:
  `message` - Message to print

#### debug

    public void debug(Throwable throwable)

Print a `Throwable`'s stacktrace to the /plugins/ShopChest/debug.txt file

Parameters:
  `throwable` - `Throwable` whose stacktrace will be printed

#### getHologramFormat

    public HologramFormat getHologramFormat()

#### getShopCommand

    public ShopCommand getShopCommand()

#### getUpdater

    public ShopUpdater getUpdater()

Returns:
  The `ShopUpdater` that schedules hologram and item updates

#### setUpdater

    public void setUpdater(ShopUpdater updater)

Set the `ShopUpdater` that schedules hologram and item updates

#### hasAreaShop

    public boolean hasAreaShop()

Returns:
  Whether the plugin 'AreaShop' is enabled

#### hasGriefPrevention

    public boolean hasGriefPrevention()

Returns:
  Whether the plugin 'GriefPrevention' is enabled

#### getGriefPrevention

    public me.ryanhamshire.GriefPrevention.GriefPrevention getGriefPrevention()

Returns:
  An instance of `GriefPrevention` or `null` if GriefPrevention is not enabled

#### hasIslandWorld

    public boolean hasIslandWorld()

Returns:
  Whether the plugin 'IslandWorld' is enabled

#### hasASkyBlock

    public boolean hasASkyBlock()

Returns:
  Whether the plugin 'ASkyBlock' is enabled

#### hasUSkyBlock

    public boolean hasUSkyBlock()

Returns:
  Whether the plugin 'uSkyBlock' is enabled

#### getUSkyBlock

    public us.talabrek.ultimateskyblock.api.uSkyBlockAPI getUSkyBlock()

Returns:
  An instance of `uSkyBlockAPI` or `null` if uSkyBlock is not enabled

#### hasPlotSquared

    public boolean hasPlotSquared()

Returns:
  Whether the plugin 'PlotSquared' is enabled

#### hasAuthMe

    public boolean hasAuthMe()

Returns:
  Whether the plugin 'AuthMe' is enabled

#### hasTowny

    public boolean hasTowny()

Returns:
  Whether the plugin 'Towny' is enabled

#### hasWorldGuard

    public boolean hasWorldGuard()

Returns:
  Whether the plugin 'WorldGuard' is enabled

#### getWorldGuard

    public com.sk89q.worldguard.bukkit.WorldGuardPlugin getWorldGuard()

Returns:
  An instance of `WorldGuardPlugin` or `null` if WorldGuard is not enabled

#### getShopUtils

    public ShopUtils getShopUtils()

Returns:
  ShopChest's `ShopUtils` containing some important methods

#### getEconomy

    public net.milkbowl.vault.economy.Economy getEconomy()

Returns:
  Registered Economy of Vault

#### getShopDatabase

    public Database getShopDatabase()

Returns:
  ShopChest's shop database

#### isUpdateNeeded

    public boolean isUpdateNeeded()

Returns:
  Whether an update is needed (will return false if not checked)

#### setUpdateNeeded

    public void setUpdateNeeded(boolean isUpdateNeeded)

Set whether an update is needed

Parameters:
  `isUpdateNeeded` - Whether an update should be needed

#### getLatestVersion

    public String getLatestVersion()

Returns:
  The latest version of ShopChest (will return null if not checked or if no update is available)

#### setLatestVersion

    public void setLatestVersion(String latestVersion)

Set the latest version

Parameters:
  `latestVersion` - Version to set as latest version

#### getDownloadLink

    public String getDownloadLink()

Returns:
  The download link of the latest version (will return null if not checked or if no update is available)

#### setDownloadLink

    public void setDownloadLink(String downloadLink)

Set the download Link of the latest version (will return null if not checked or if no update is available)

Parameters:
  `downloadLink` - Link to set as Download Link

#### getShopChestConfig

    public Config getShopChestConfig()

Returns:
  The `Config` of ShopChest