Update formatting

This commit is contained in:
Jakob K
2021-05-15 21:26:10 +02:00
parent ddc576a394
commit fa8fa9ae96
71 changed files with 203 additions and 249 deletions

View File

@@ -8,6 +8,7 @@ import org.bukkit.inventory.Inventory
object GUIHolder : AutoCloseable {
private val registered = HashMap<Inventory, GUIInstance<ForInventory>>()
fun register(guiInstance: GUIInstance<ForInventory>) {
registered[guiInstance.bukkitInventory] = guiInstance
}
@@ -39,6 +40,7 @@ object GUIHolder : AutoCloseable {
val inv = it.inventory
val gui = registered[inv] ?: return@listen
val player = it.playerOrCancel ?: return@listen
var ifCancel = false
for (slotIndex in it.inventorySlots) {
@@ -80,4 +82,4 @@ private val InventoryInteractEvent.playerOrCancel: Player?
get() = (whoClicked as? Player) ?: kotlin.run {
isCancelled = true
return null
}
}