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

Invert if statement

This commit is contained in:
Senne 2022-01-01 22:48:16 +01:00
parent 4792124224
commit ef8e84a350
No known key found for this signature in database
GPG Key ID: EA68733326BBA376

View File

@ -45,7 +45,10 @@ public class MiddleClickListener implements Listener {
// get the block the player is looking at for later
Block b = player.getTargetBlockExact(5);
if (isActualMiddleClick(e, b)) {
if (!isActualMiddleClick(e, b)) {
return;
}
// find the actual slimefun item the user is looking at
String id = BlockStorage.checkID(b);
SlimefunItem sfItem = SlimefunItem.getById(id);
@ -74,7 +77,6 @@ public class MiddleClickListener implements Listener {
e.setCursor(sfItem.getItem().clone());
}
}
}
private boolean isActualMiddleClick(InventoryCreativeEvent e, Block b) {
/*