SPIGOT-1914: Compare PotionEffectType objects using Object#equals(Object) when searching for a custom effect to remove
By: Matthew <stteg@hotmail.com>
This commit is contained in:
parent
a1e534fc20
commit
7686c72be2
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue