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

Unite the ifs

This commit is contained in:
svr333 2022-10-02 23:29:19 +02:00
parent 6918cec220
commit 9fd47ea8aa
No known key found for this signature in database
GPG Key ID: EA68733326BBA376

View File

@ -66,11 +66,7 @@ public class LumberAxe extends SlimefunItem implements NotPlaceable {
@Nonnull
public ItemUseHandler onItemUse() {
return e -> {
if (e.getClickedBlock().isPresent()) {
if (e.getPlayer().isSneaking()) {
return;
}
if (e.getClickedBlock().isPresent() && !e.getPlayer().isSneaking()) {
Block block = e.getClickedBlock().get();
if (isUnstrippedLog(block)) {