Package com.vk2gpz.autosell.object
Class Shop
java.lang.Object
com.vk2gpz.autosell.object.Shop
Represents a shop in the AutoSell plugin.
Each shop has a name, priority, and a map of item prices.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
getBaseWorth
(org.bukkit.inventory.ItemStack item) Gets the base worth of an item in the shop.getName()
int
int
void
void
setPriority
(int priority) void
setShopName
(String name)
-
Field Details
-
name
The name of the shop. -
priority
protected int priorityThe priority of the shop. -
prices
The map of item prices in the shop. The key is the ItemStack and the value is the price.
-
-
Constructor Details
-
Shop
Constructor to initialize the Shop object with a name.- Parameters:
name
- The name of the shop.
-
-
Method Details
-
getName
-
setShopName
-
getBaseWorth
public double getBaseWorth(org.bukkit.inventory.ItemStack item) Gets the base worth of an item in the shop.- Parameters:
item
- The item to get the base worth for.- Returns:
- The base worth of the item, or -1.0 if not found.
-
getPrices
-
setPrices
-
getPriority
public int getPriority() -
setPriority
public void setPriority(int priority) -
getShopSize
public int getShopSize()
-