mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-05-30 21:56:24 +02:00
fix matchPotionType: correctly match extended and upgraded potions fixes #5181
This commit is contained in:
parent
c3103beea2
commit
045f1bdfb6
@ -79,8 +79,8 @@ public class PotionUtil {
|
||||
String updatedName = convertLegacyNames(partialName).toUpperCase();
|
||||
return Arrays.stream(PotionType.values())
|
||||
.filter(potionType -> getKeyGetKey(potionType).toUpperCase().contains(updatedName))
|
||||
.filter(potionType -> !isUpgraded || potionType.name().toUpperCase().contains(STRONG))
|
||||
.filter(potionType -> !isExtended || potionType.name().toUpperCase().contains(LONG))
|
||||
.filter(potionType -> isUpgraded == potionType.name().toUpperCase().startsWith(STRONG + "_"))
|
||||
.filter(potionType -> isExtended == potionType.name().toUpperCase().startsWith(LONG + "_"))
|
||||
.findAny().orElse(null);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user