mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 22:22:18 -07:00
SPIGOT-2272: Add API for virtual Merchants
By: Lukas Hennig <lukas@wirsindwir.de>
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user