getOpenInventory

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

Deprecated

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

Replace with

import dev.s7a.ktinventory.util.getTopInventory
getTopInventory(clazz, player)

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

clazz

The KClass of the inventory type

player

The player whose inventory to check

Type Parameters

T

The type of inventory extending AbstractKtInventory


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

Deprecated

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

Replace with

import dev.s7a.ktinventory.util.getTopInventory
getTopInventory<T>(player)

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

player

The player whose inventory to check

Type Parameters

T

The type of inventory extending AbstractKtInventory