SPIGOT-1936: LootTable API

By: Senmori <thesenmori@gmail.com>
This commit is contained in:
Bukkit/Spigot
2018-08-12 18:23:28 +10:00
parent 15d9fd30b9
commit f50aec2a42
14 changed files with 421 additions and 8 deletions

View File

@@ -33,6 +33,7 @@ import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.Merchant;
import org.bukkit.inventory.Recipe;
import org.bukkit.loot.LootTable;
import org.bukkit.map.MapView;
import org.bukkit.permissions.Permissible;
import org.bukkit.plugin.PluginManager;
@@ -1253,6 +1254,16 @@ public final class Bukkit {
return server.getTag(registry, tag, clazz);
}
/**
* Gets the specified {@link LootTable}.
*
* @param key the name of the LootTable
* @return the LootTable, or null if no LootTable is found with that name
*/
public static LootTable getLootTable(NamespacedKey key) {
return server.getLootTable(key);
}
/**
* @see UnsafeValues
* @return the unsafe values instance