SPIGOT-6789: Improve resource pack related API

By: Patrick Choe <mailpatrickkr@gmail.com>
This commit is contained in:
Bukkit/Spigot
2021-12-18 11:46:20 +11:00
parent 7f87269fa8
commit a44ad8b54a
3 changed files with 225 additions and 6 deletions

View File

@@ -202,6 +202,41 @@ public interface Server extends PluginMessageRecipient {
*/
public boolean getAllowNether();
/**
* Gets the server resource pack uri, or empty string if not specified.
*
* @return the server resource pack uri, otherwise empty string
*/
@NotNull
public String getResourcePack();
/**
* Gets the SHA-1 digest of the server resource pack, or empty string if
* not specified.
*
* @return the SHA-1 digest of the server resource pack, otherwise empty
* string
*/
@NotNull
public String getResourcePackHash();
/**
* Gets the custom prompt message to be shown when the server resource
* pack is required, or empty string if not specified.
*
* @return the custom prompt message to be shown when the server resource,
* otherwise empty string
*/
@NotNull
public String getResourcePackPrompt();
/**
* Gets whether the server resource pack is enforced.
*
* @return whether the server resource pack is enforced
*/
public boolean isResourcePackRequired();
/**
* Gets whether this server has a whitelist or not.
*