public class ShopUtils extends Object
Modifier and Type | Method and Description |
---|---|
void |
addShop(Shop shop,
boolean addToDatabase)
Add a shop
|
Shop |
getShop(org.bukkit.Location location)
Get the shop at a given location
|
int |
getShopAmount(org.bukkit.OfflinePlayer p)
Get the amount of shops of a player
|
int |
getShopLimit(org.bukkit.entity.Player p)
Get the shop limits of a player
|
Shop[] |
getShops()
Get all Shops
|
boolean |
isShop(org.bukkit.Location location)
Checks whether there is a shop at a given location
|
int |
reloadShops(boolean reloadConfig)
Reload the shops
|
void |
removeShop(Shop shop,
boolean removeFromDatabase)
Remove a shop
|
public ShopUtils(ShopChest plugin)
public Shop getShop(org.bukkit.Location location)
location
- Location of the shoppublic boolean isShop(org.bukkit.Location location)
location
- Location to checkpublic Shop[] getShops()
public void addShop(Shop shop, boolean addToDatabase)
shop
- Shop to addaddToDatabase
- Whether the shop should also be added to the databasepublic void removeShop(Shop shop, boolean removeFromDatabase)
shop
- Shop to removeremoveFromDatabase
- Whether the shop should also be removed from the databasepublic int getShopLimit(org.bukkit.entity.Player p)
p
- Player, whose shop limits should be returnedpublic int getShopAmount(org.bukkit.OfflinePlayer p)
p
- Player, whose shops should be countedConfig.exclude_admin_shops
is true, admin shops won't be counted)public int reloadShops(boolean reloadConfig)
reloadConfig
- Whether the configuration should also be reloadedCopyright © 2016. All rights reserved.