Update InventoryExtensions.kt
This commit is contained in:
@@ -1,5 +1,14 @@
|
|||||||
package net.axay.kspigot.extensions.bukkit
|
package net.axay.kspigot.extensions.bukkit
|
||||||
|
|
||||||
|
import org.bukkit.event.inventory.InventoryAction
|
||||||
import org.bukkit.inventory.Inventory
|
import org.bukkit.inventory.Inventory
|
||||||
|
|
||||||
fun Inventory.closeForViewers() = viewers.forEach { it.closeInventory() }
|
fun Inventory.closeForViewers() = viewers.forEach { it.closeInventory() }
|
||||||
|
|
||||||
|
val InventoryAction.isSimple
|
||||||
|
get() = when (this) {
|
||||||
|
InventoryAction.PLACE_ALL, InventoryAction.PLACE_ONE,
|
||||||
|
InventoryAction.PICKUP_ALL, InventoryAction.PICKUP_HALF, InventoryAction.PICKUP_ONE
|
||||||
|
-> true
|
||||||
|
else -> false
|
||||||
|
}
|
Reference in New Issue
Block a user