ResourcePack - Send Request (Section) — SkBee

Addon: SkBee · Category: Section · Since: 3.21.0

Syntax

send [a] resource pack[s] to %audience/playerconnection%

Description

Send a resource pack request to an audience or player connection. This is similar to the effect but includes a callback section to handle what the client does. This can be used in the 'Async Player Connection Configure' event as well.

**Entries**: - `packs` = A section where you can apply multiple packs to send at once (required). - Use the 'ResourcePack - Apply Pack' effect to add packs in this section. - `prompt` = The prompt to send to the player. Accepts String/TextComponent/TextComp. [optional] - `force` = Whether or not to force the player to accept the resource pack [optional boolean]. - `received` = A callback section where you can run code when the resource pack is received. - This section may be called multiple times for different stages of the request.

**Event Values in Received Section**: - `event-uuid` = The id of the resource pack. - `event-status` = The status (ResourcePackStatus) of the resource pack request. - `event-audience` = The audience of the resource pack request.

Examples

send resource packs to player:
	prompt: "Please accept our packs"
	force: true
	packs:
		apply pack with url "some.url" with id (random uuid)
		apply pack with url "anoter.url" with id (random uuid)
	received:
		if event-status = successfully_loaded:
			send "YAY" to event-audience

View source