public class ResourcePackManager
extends java.lang.Object
the resource pack is automatically hosted on an embedded http server. (See
ResourcePackServer
)
Port settings may be changed though configuration.
Modifier and Type | Field and Description |
---|---|
static boolean |
hasSendWithHash
Checks if the server has the method to send the resource pack's hash to the
player.
|
static boolean |
neededRebuild
Whether the Resource Pack ended up being rebuilt or not.
|
static java.lang.String |
resourcePackMd5
The md5 of the current resource pack, used to check resource pack changes.
|
static java.lang.String |
resourcePackSha1 |
static byte[] |
resourcePackSha1Byte |
static java.util.HashMap<java.lang.String,java.lang.String> |
resourceUsers
It stores the name and version of plugin that uses this resource manager.
|
Constructor and Description |
---|
ResourcePackManager() |
Modifier and Type | Method and Description |
---|---|
static void |
buildResourcePack() |
static boolean |
getForceResourcePack() |
static java.lang.String |
getServerResourcePack() |
static boolean |
hasResource() |
static void |
registerResource(org.bukkit.plugin.java.JavaPlugin plugin,
java.io.InputStream source)
Register a resource pack to be combined into server resource pack.
|
static void |
registerResourceUser(org.bukkit.plugin.java.JavaPlugin plugin)
register the given plugin as a resource pack user, if the version or presence
of the plugin change, a new resource pack will be build on server start up.
|
static void |
setForceResourcePack()
See
force |
public static final java.util.HashMap<java.lang.String,java.lang.String> resourceUsers
public static boolean neededRebuild
public static java.lang.String resourcePackMd5
public static java.lang.String resourcePackSha1
public static byte[] resourcePackSha1Byte
public static boolean hasSendWithHash
public static void registerResource(org.bukkit.plugin.java.JavaPlugin plugin, java.io.InputStream source) throws java.io.IOException
You may only use this method inside your onEnable() method, else the resource
will not be registered correctly.
When a new resource being registered the first time, the server cache will be
reconstructed.
java.io.IOException
public static void registerResourceUser(org.bukkit.plugin.java.JavaPlugin plugin)
public static void buildResourcePack() throws java.io.IOException
java.io.IOException
public static void setForceResourcePack()
force
public static boolean getForceResourcePack()
force
public static java.lang.String getServerResourcePack()
public static boolean hasResource()