Skip to content

Commit a2c0d76

Browse files
Optimize Finding logic
1 parent 1a74c74 commit a2c0d76

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Find.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @Not
9595
}
9696
}
9797
if (excludeOutOfStock) {
98-
if (shop.isSelling() && shop.getRemainingStock() == 0) {
99-
continue;
100-
} else if (shop.isBuying() && shop.getRemainingSpace() == 0) {
98+
if ((shop.isSelling() && shop.getRemainingStock() == 0) || (shop.isBuying() && shop.getRemainingSpace() == 0)) {
10199
continue;
102100
}
103101
}

0 commit comments

Comments
 (0)