Skip to content

Commit

Permalink
Update src/main/java/io/github/thebusybiscuit/slimefun4/implementatio…
Browse files Browse the repository at this point in the history
…n/listeners/MiddleClickListener.java

Co-authored-by: Daniel Walsh <[email protected]>
  • Loading branch information
JustAHuman-xD and WalshyDev authored Oct 25, 2024
1 parent d8bbaf4 commit 6aa40f3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ public void onInventoryCreativeEvent(InventoryCreativeEvent e) {
* ClickType is not MIDDLE but CREATIVE (because this ClickType covers
* multiple cases, we have to filter out more later on)
*/
if (e.getClick() == ClickType.CREATIVE && e.getSlotType() == SlotType.QUICKBAR && e.getWhoClicked() instanceof Player player) {
if (e.getClick() == ClickType.CREATIVE
&& e.getSlotType() == SlotType.QUICKBAR
&& e.getWhoClicked() instanceof Player player
) {
// get the block the player is looking at for later
Block b = player.getTargetBlockExact(5);

Expand Down

0 comments on commit 6aa40f3

Please sign in to comment.