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

@ -0,0 +1,54 @@
package org.bukkit.packs;
import java.util.UUID;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents a resource pack.
*
* @see <a href="https://minecraft.wiki/w/Resource_pack">Minecraft wiki</a>
*/
@ApiStatus.Experimental
public interface ResourcePack {
/**
* Gets the id of the resource pack.
*
* @return the id
*/
@NotNull
public UUID getId();
/**
* Gets the url of the resource pack.
*
* @return the url
*/
@NotNull
public String getUrl();
/**
* Gets the hash of the resource pack.
*
* @return the hash
*/
@Nullable
public String getHash();
/**
* Gets the prompt to show of the resource pack.
*
* @return the prompt
*/
@Nullable
public String getPrompt();
/**
* Gets if the resource pack is required by the server.
*
* @return True if is required
*/
public boolean isRequired();
}