Skip to content

Commit

Permalink
use a normal for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Caedis committed Feb 16, 2024
1 parent 6b9d765 commit d130070
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ protected final void addHandler(@NotNull String className,
}

protected @NotNull DurabilityLikeInfo getDurabilityLikeInfo(@NotNull ItemStack itemStack) {
for (Pair<@NotNull Class<?>, @NotNull Function<@NotNull ItemStack, @Nullable DurabilityLikeInfo>> handler : handlers) {
int handlerSize = handlers.size();
for (int i = 0; i < handlerSize; i++) {
Pair<@NotNull Class<?>, @NotNull Function<@NotNull ItemStack, @Nullable DurabilityLikeInfo>> handler = handlers
.get(i);
if (handler.getLeft()
.isInstance(itemStack.getItem())) {
DurabilityLikeInfo info = handler.getRight()
Expand Down

0 comments on commit d130070

Please sign in to comment.