mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 22:22:18 -07:00
SPIGOT-6789: Improve resource pack related API
By: Patrick Choe <mailpatrickkr@gmail.com>
This commit is contained in:
@@ -245,6 +245,49 @@ public final class Bukkit {
|
||||
return server.getAllowNether();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the server resource pack uri, or empty string if not specified.
|
||||
*
|
||||
* @return the server resource pack uri, otherwise empty string
|
||||
*/
|
||||
@NotNull
|
||||
public static String getResourcePack() {
|
||||
return server.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 static String getResourcePackHash() {
|
||||
return server.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 static String getResourcePackPrompt() {
|
||||
return server.getResourcePackPrompt();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether the server resource pack is enforced.
|
||||
*
|
||||
* @return whether the server resource pack is enforced
|
||||
*/
|
||||
public static boolean isResourcePackRequired() {
|
||||
return server.isResourcePackRequired();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether this server has a whitelist or not.
|
||||
*
|
||||
|
Reference in New Issue
Block a user