getAllViewers

fun <T : AbstractKtInventory> getAllViewers(clazz: KClass<T>): Map<Player, T>

Deprecated

Deprecated in v2.2.0. Will be removed in v2.5.0. Use getViewers instead.

Replace with

import dev.s7a.ktinventory.util.getViewers
getViewers(clazz)

Gets all online players currently viewing an inventory of the specified type.

Return

Map of players to their open inventories of type T

Since

2.0.0

Parameters

clazz

The KClass of the inventory type

Type Parameters

T

The type of inventory extending AbstractKtInventory


inline fun <T : AbstractKtInventory> getAllViewers(): Map<Player, T>

Deprecated

Deprecated in v2.2.0. Will be removed in v2.5.0. Use getViewers instead.

Replace with

import dev.s7a.ktinventory.util.getViewers
getViewers<T>()

Gets all online players currently viewing an inventory of the specified type.

Return

Map of players to their open inventories of type T

Since

2.0.0

Type Parameters

T

The type of inventory extending AbstractKtInventory