getOpenInventory

fun <T : AbstractKtInventory> getOpenInventory(clazz: KClass<T>, player: HumanEntity): T?

Gets the currently open inventory of the specified type for a player.

Return

The open inventory of type T, or null if not found

Since

2.0.0

Parameters

T

The type of inventory extending AbstractKtInventory

clazz

The KClass of the inventory type

player

The player whose inventory to check


inline fun <T : AbstractKtInventory> getOpenInventory(player: HumanEntity): T?

Gets the currently open inventory of the specified type for a player.

Return

The open inventory of type T, or null if not found

Since

2.0.0

Parameters

T

The type of inventory extending AbstractKtInventory

player

The player whose inventory to check