mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-25 17:01:45 +01:00
SPIGOT-1914: Compare PotionEffectType objects using Object#equals(Object) when searching for a custom effect to remove
This commit is contained in:
parent
87e677ce49
commit
e43b2780a5
@ -205,7 +205,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
|
|||||||
Iterator<PotionEffect> iterator = customEffects.iterator();
|
Iterator<PotionEffect> iterator = customEffects.iterator();
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
PotionEffect effect = iterator.next();
|
PotionEffect effect = iterator.next();
|
||||||
if (effect.getType() == type) {
|
if (type.equals(effect.getType())) {
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user