Skip to content

Commit 6db273a

Browse files
committed
fix: Fix chat query getting instantly cancelled
1 parent 71bb6d2 commit 6db273a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,10 @@ public abstract class AbstractInterfaceView<I : InterfacesInventory, T : Interfa
9393
reason: InventoryCloseEvent.Reason = InventoryCloseEvent.Reason.UNKNOWN,
9494
changingView: Boolean = reason == InventoryCloseEvent.Reason.OPEN_NEW
9595
) {
96-
// End a possible chat query with the listener
97-
InterfacesListeners.INSTANCE.abortQuery(player.uniqueId, this)
96+
if (!changingView) {
97+
// End a possible chat query with the listener (unless we're changing views)
98+
InterfacesListeners.INSTANCE.abortQuery(player.uniqueId, this)
99+
}
98100

99101
// Ensure that the menu does not open
100102
openIfClosed.set(false)

0 commit comments

Comments
 (0)