SPIGOT-2272: Add API for virtual Merchants

By: Lukas Hennig <lukas@wirsindwir.de>
This commit is contained in:
Bukkit/Spigot
2016-11-21 15:29:10 +11:00
parent b57d05eeea
commit 229ff86864
7 changed files with 113 additions and 65 deletions

View File

@@ -29,6 +29,7 @@ import org.bukkit.help.HelpMap;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.Merchant;
import org.bukkit.inventory.Recipe;
import org.bukkit.map.MapView;
import org.bukkit.permissions.Permissible;
@@ -761,6 +762,15 @@ public interface Server extends PluginMessageRecipient {
*/
Inventory createInventory(InventoryHolder owner, int size, String title) throws IllegalArgumentException;
/**
* Creates an empty merchant.
*
* @param title the title of the corresponding merchant inventory, displayed
* when the merchant inventory is viewed
* @return a new merchant
*/
Merchant createMerchant(String title);
/**
* Gets user-specified limit for number of monsters that can spawn in a
* chunk.