Phpcraft
|
Public Member Functions | |
__construct (string $index_url) | |
doesAssetExist (string $name) | |
getAssetIndex () | |
downloadAllAssets () | |
downloadAsset (string $name) | |
buildLegacyAssetsFolder () | |
Static Public Member Functions | |
static | latest () |
static | fromMinecraftVersion (string $version) |
Public Attributes | |
$index_url | |
Phpcraft\AssetsManager::__construct | ( | string | $index_url | ) |
string | $index_url | The URL to the asset index. |
Phpcraft\AssetsManager::buildLegacyAssetsFolder | ( | ) |
Builds the legacy assets folder for versions before 1.7.2.
Phpcraft\AssetsManager::doesAssetExist | ( | string | $name | ) |
string | $name |
Phpcraft\AssetsManager::downloadAllAssets | ( | ) |
Downloads all assets.
Phpcraft\AssetsManager::downloadAsset | ( | string | $name | ) |
Downloads an asset by name and returns the path to the downloaded file or null if the asset doesn't exist.
string | $name |
|
static |
Returns an AssetsManager using the given Minecraft version's asset index.
string | $version | The Minecraft version you'd like to access the assets of. |
Exception | if the version manifest for the given version couldn't be fetched. |
Phpcraft\AssetsManager::getAssetIndex | ( | ) |
Returns the JSON-decoded content of the asset index of the version.
|
static |
Returns an AssetsManager using the latest supported Minecraft version's asset index.
Exception | if the version manifest couldn't be fetched. |
Phpcraft\AssetsManager::$index_url |