Skip to content

Commit c9d5207

Browse files
committed
chore: use == for enum comparison
1 parent e0d88b7 commit c9d5207

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,14 +495,14 @@ private static boolean equalsItemMeta(@Nonnull ItemMeta itemMeta, @Nonnull ItemM
495495
return potionMeta.getBasePotionData().equals(sfPotionMeta.getBasePotionData());
496496
} else if (current.isBefore(20, 5)) {
497497
// getBasePotionType without null check for 1.20.3 and 1.20.4
498-
return potionMeta.getBasePotionType().equals(sfPotionMeta.getBasePotionType());
498+
return potionMeta.getBasePotionType() == sfPotionMeta.getBasePotionType();
499499
}
500500
// check if potionMetha has a basePotionType (acting a null check for getBasePotionType
501501
// on 1.20.5+
502502
if (potionMeta.hasBasePotionType() != sfPotionMeta.hasBasePotionType()) {
503503
return false;
504504
}
505-
return potionMeta.getBasePotionType().equals(sfPotionMeta.getBasePotionType());
505+
return potionMeta.getBasePotionType() == sfPotionMeta.getBasePotionType();
506506
}
507507

508508
/**

0 commit comments

Comments
 (0)