1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 11:45:51 +00:00

Update src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockListener.java

Co-authored-by: Daniel Walsh <walshydev@gmail.com>
This commit is contained in:
svr333 2021-10-09 15:46:50 +02:00 committed by GitHub
parent f320fe5d9f
commit da46794ac4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,11 +141,11 @@ public class BlockListener implements Listener {
Block b = player.getTargetBlockExact(5); Block b = player.getTargetBlockExact(5);
/* /*
* This check is really weird due to the weird nature of this event's behaviour. * This check is really weird due to the weird nature of this event's behaviour.
* It checks if the block the player is looking at is of the same type as the cursor; * It checks if the block the player is looking at is of the same type as the cursor;
* after this we can make sure that it is a middle click outside of the inventory * after this we can make sure that it is a middle click outside of the inventory
* currentItem should also be air, otherwise it is not outside of the inventory * currentItem should also be air, otherwise it is not outside of the inventory
*/ */
boolean isOutsideInventoryClick = e.getCursor().getType() == b.getType() && e.getCurrentItem().getType() == Material.AIR; boolean isOutsideInventoryClick = e.getCursor().getType() == b.getType() && e.getCurrentItem().getType() == Material.AIR;
// player is looking at WALL_HEAD but it's actually a player head // player is looking at WALL_HEAD but it's actually a player head