File tree 1 file changed +10
-1
lines changed
interfaces/src/main/kotlin/com/noxcrew/interfaces
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -507,7 +507,16 @@ public class InterfacesListeners private constructor(private val plugin: Plugin)
507
507
view : AbstractInterfaceView <* , * , * >,
508
508
clickedPoint : GridPoint ,
509
509
isPlayerInventory : Boolean
510
- ): Boolean = view.pane.getRaw(clickedPoint) == null && ! (view.builder.preventClickingEmptySlots && ! (view.builder.allowClickingOwnInventoryIfClickingEmptySlotsIsPrevented && isPlayerInventory))
510
+ ): Boolean {
511
+ // If we don't allow clicking empty slots we never allow freely moving
512
+ if (view.builder.preventClickingEmptySlots && ! (view.builder.allowClickingOwnInventoryIfClickingEmptySlotsIsPrevented && isPlayerInventory)) return false
513
+
514
+ // If this inventory has no player inventory then the player inventory is always allowed to be edited
515
+ if (! view.backing.includesPlayerInventory && isPlayerInventory) return true
516
+
517
+ // If there is no item here we allow editing
518
+ return view.pane.getRaw(clickedPoint) == null
519
+ }
511
520
512
521
/* * Handles a [view] being clicked at [clickedPoint] through some [event]. */
513
522
private fun handleClick (
You can’t perform that action at this time.
0 commit comments