SPIGOT-2272: Add API for virtual Merchants
By: Lukas Hennig <lukas@wirsindwir.de>
This commit is contained in:
parent
b57d05eeea
commit
229ff86864
7 changed files with 113 additions and 65 deletions
|
@ -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;
|
||||
|
@ -931,6 +932,17 @@ public final class Bukkit {
|
|||
return server.createInventory(owner, size, title);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an empty merchant.
|
||||
*
|
||||
* @param title the title of the corresponding merchant inventory, displayed
|
||||
* when the merchant inventory is viewed
|
||||
* @return a new merchant
|
||||
*/
|
||||
public static Merchant createMerchant(String title) {
|
||||
return server.createMerchant(title);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets user-specified limit for number of monsters that can spawn in a
|
||||
* chunk.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue