Skip to content

Commit eb2c5f6

Browse files
committed
Properly pass close reason
1 parent df65f6e commit eb2c5f6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

interfaces/src/main/kotlin/com/noxcrew/interfaces/view/AbstractInterfaceView.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public abstract class AbstractInterfaceView<I : InterfacesInventory, P : Pane>(
157157
}
158158

159159
override suspend fun close(reason: InventoryCloseEvent.Reason, closeInventory: Boolean) {
160-
markClosed()
160+
markClosed(reason, closeInventory)
161161

162162
if (isOpen() && closeInventory) {
163163
// Ensure we always close on the main thread!

interfaces/src/main/kotlin/com/noxcrew/interfaces/view/PlayerInterfaceView.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import com.noxcrew.interfaces.pane.PlayerPane
77
import com.noxcrew.interfaces.utilities.runSync
88
import net.kyori.adventure.text.Component
99
import org.bukkit.entity.Player
10+
import org.bukkit.event.inventory.InventoryCloseEvent
1011
import org.bukkit.event.inventory.InventoryType
1112
import kotlin.time.Duration
1213

@@ -59,8 +60,8 @@ public class PlayerInterfaceView internal constructor(
5960
}
6061
}
6162

62-
override suspend fun close() {
63-
markClosed()
63+
override suspend fun close(reason: InventoryCloseEvent.Reason, closeInventory: Boolean) {
64+
markClosed(reason, closeInventory)
6465

6566
// Ensure we update the interface state in the main thread!
6667
// Even if the menu is not currently on the screen.

0 commit comments

Comments
 (0)