What's vault?
This would ensure that the server owner doesn't have duplicate files specifying the prices for the items that they want to be transactable.
However, it is also absolutely necessary for my plugin, AutoEconomy, because the prices for items will automatically be changing, and so keeping prices in sync with AutoEconomy's market would be impossible without direct support for it.
My proposed interface was as follows:
Unfortunately, my proposition was denied with the major reason being that it likely wouldn't end up being widely adopted, and the maintainers of Vault don't need the extra workload.
As they've suggested, and as I intended to do if the proposition was rejected, I'm going to be creating my own Vault-like plugin to serve the purposes I've described.
I will add implementation for all the major shop plugins, Essentials, ShopGUI+, Sign Shop, Boss Shop, Shop, Chest Shop, and of course AutoEconomy.
I have two questions for you, my fellow developers:
Would you use it?
And what should the project be called?
Vault allows any plugin to interact with whatever chat/permissions/economy plugin the server has installed without knowing what chat/permissions/economy plugin the server has installed and directly supporting it. As long as both plugins support Vault, they both support each other.
I recently proposed to the maintainers of Vault that Shop/Market support be added, so that plugins like VoidChest, AutoFarm, SellHand, PickAxeSell, etc, etc, etc, can buy/sell items for the price set by the shop/market that the server is using.
This would ensure that the server owner doesn't have duplicate files specifying the prices for the items that they want to be transactable.
However, it is also absolutely necessary for my plugin, AutoEconomy, because the prices for items will automatically be changing, and so keeping prices in sync with AutoEconomy's market would be impossible without direct support for it.
My proposed interface was as follows:
Code:
import java.util.List;
import org.bukkit.OfflinePlayer;
import org.bukkit.inventory.ItemStack;
public interface Market {
public boolean isEnabled();
public String getName();
public double buy(OfflinePlayer buyer, ItemStack item, int amt);
public double buy(OfflinePlayer buyer, String label, int amt);
public double sell(OfflinePlayer seller, ItemStack item, int amt);
public double sell(OfflinePlayer seller, String label, int amt);
public boolean hasMarketAccess(OfflinePlayer player);
public boolean isDamagedItemSellingSupported(OfflinePlayer player);
public List<ItemStack> getTransactableItems(OfflinePlayer player);
public List<String> getTransactableLabels(OfflinePlayer player);
public boolean isBuyable(OfflinePlayer player, ItemStack item);
public boolean isBuyable(OfflinePlayer player, String label);
public boolean isSellable(OfflinePlayer player, ItemStack item);
public boolean isSellable(OfflinePlayer player, String label);
public double getBuyPrice(OfflinePlayer player, ItemStack item, int amt);
public double getBuyPrice(OfflinePlayer player, String label, int amt);
public double getSellPrice(OfflinePlayer player, ItemStack item, int amt);
public double getSellPrice(OfflinePlayer player, String label, int amt);
}
Unfortunately, my proposition was denied with the major reason being that it likely wouldn't end up being widely adopted, and the maintainers of Vault don't need the extra workload.
As they've suggested, and as I intended to do if the proposition was rejected, I'm going to be creating my own Vault-like plugin to serve the purposes I've described.
I will add implementation for all the major shop plugins, Essentials, ShopGUI+, Sign Shop, Boss Shop, Shop, Chest Shop, and of course AutoEconomy.
I have two questions for you, my fellow developers:
Would you use it?
And what should the project be called?
