Skip to content

Commit

Permalink
chore: Spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeltumn committed Oct 8, 2024
1 parent ea68de8 commit a1a105c
Showing 1 changed file with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,25 +342,25 @@ public class InterfacesListeners private constructor(private val plugin: Plugin)
// Don't check top inventory if we're in the player inventory!
if (
(
!isInPlayerInventory && topInventory.withIndex().any { (index, it) ->
// Check if any item is being collected that cannot be moved!
it != null && it.isSimilar(clickedItem) && !canFreelyMove(
view,
requireNotNull(GridPoint.fromBukkitChestSlot(index)),
false
)
}
) ||
!isInPlayerInventory && topInventory.withIndex().any { (index, it) ->
// Check if any item is being collected that cannot be moved!
it != null && it.isSimilar(clickedItem) && !canFreelyMove(
view,
requireNotNull(GridPoint.fromBukkitChestSlot(index)),
false
)
}
) ||
bottomInventory.withIndex().any { (index, it) ->
it != null && it.isSimilar(clickedItem) &&
// These slots are always in the player inventory and always need to be relativized!
!canFreelyMove(
view,
view.backing.relativizePlayerInventorySlot(
requireNotNull(GridPoint.fromBukkitPlayerSlot(index))
),
true
)
// These slots are always in the player inventory and always need to be relativized!
!canFreelyMove(
view,
view.backing.relativizePlayerInventorySlot(
requireNotNull(GridPoint.fromBukkitPlayerSlot(index))
),
true
)
}
) {
event.isCancelled = true
Expand Down

0 comments on commit a1a105c

Please sign in to comment.