@@ -252,7 +252,7 @@ public class InterfacesListeners private constructor(private val plugin: Plugin)
252
252
val isPlayerInventory = (event.clickedInventory ? : event.inventory).holder is Player
253
253
254
254
// Run base click handling
255
- if (handleClick(view, clickedPoint, event.click, event.hotbarButton, isPlayerInventory)) {
255
+ if (handleClick(view, clickedPoint, event.click, event.hotbarButton, isPlayerInventory, false )) {
256
256
event.isCancelled = true
257
257
}
258
258
@@ -415,7 +415,7 @@ public class InterfacesListeners private constructor(private val plugin: Plugin)
415
415
return
416
416
}
417
417
418
- if (handleClick(view, clickedPoint, click, - 1 , true )) {
418
+ if (handleClick(view, clickedPoint, click, - 1 , isPlayerInventory = true , interact = true )) {
419
419
// Support modern behavior where we don't interfere with block interactions
420
420
if (view.builder.onlyCancelItemInteraction) {
421
421
event.setUseItemInHand(Event .Result .DENY )
@@ -557,7 +557,8 @@ public class InterfacesListeners private constructor(private val plugin: Plugin)
557
557
clickedPoint : GridPoint ,
558
558
click : ClickType ,
559
559
slot : Int ,
560
- isPlayerInventory : Boolean
560
+ isPlayerInventory : Boolean ,
561
+ interact : Boolean
561
562
): Boolean {
562
563
// Determine the type of click, if nothing was clicked we allow it
563
564
val raw = view.pane.getRaw(clickedPoint)
@@ -581,7 +582,7 @@ public class InterfacesListeners private constructor(private val plugin: Plugin)
581
582
view.isProcessingClick = true
582
583
583
584
// Forward this click to all pre-processors
584
- val clickContext = ClickContext (view.player, view, click, slot)
585
+ val clickContext = ClickContext (view.player, view, click, slot, interact )
585
586
view.builder.clickPreprocessors
586
587
.forEach { handler -> ClickHandler .process(handler, clickContext) }
587
588
0 commit comments