ResourcePackManager

object ResourcePackManager : Listener

Controls which players receive which resource packs.

Functions

Link copied to clipboard
fun disablePack(player: OfflinePlayer, id: Key)

Explicitly disables the resource pack with id for player, overwriting the default behavior.

Link copied to clipboard
fun enablePack(player: OfflinePlayer, id: Key)

Explicitly enables the resource pack with id for player, overwriting the default behavior.

Link copied to clipboard
fun getEnabledPacks(player: OfflinePlayer): Set<Key>

Gets the ids of enabled resource packs for player. Includes the ids of all packs that are enabled by default or explicitly enabled via enablePack.

Link copied to clipboard
fun Listener.registerEvents()

Shortcut for PluginManager.registerEvents, registered under the Nova plugin.

Link copied to clipboard
fun resetPack(player: OfflinePlayer, id: Key)

Resets the resource pack with id for player, removing it from the explicitly enabled and disabled packs.

Link copied to clipboard
fun Listener.unregisterEvents()

Unregisters this Listener from all events.