SPIGOT-7530, #948: Improve Resource Pack API with new 1.20.3 functionality

By: Doc <nachito94@msn.com>
This commit is contained in:
Bukkit/Spigot
2024-01-31 22:02:41 +11:00
parent 83aefc37a9
commit 9a36ebd659
4 changed files with 120 additions and 0 deletions

View File

@ -44,6 +44,7 @@ import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.loot.LootTable;
import org.bukkit.map.MapView;
import org.bukkit.packs.DataPackManager;
import org.bukkit.packs.ResourcePack;
import org.bukkit.permissions.Permissible;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.ServicesManager;
@ -280,6 +281,16 @@ public final class Bukkit {
return server.getDataPackManager();
}
/**
* Gets the resource pack configured to be sent to clients by the server.
*
* @return the resource pack
*/
@Nullable
public static ResourcePack getServerResourcePack() {
return server.getServerResourcePack();
}
/**
* Get the ServerTick Manager.
*