Fixed bug with parkour enchantment checks.
This commit is contained in:
parent
b5ef46007f
commit
45da22b0bf
@ -20,6 +20,7 @@ import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.player.PlayerVelocityEvent;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -192,8 +193,11 @@ public class ParkourManager extends MiniPlugin
|
||||
}
|
||||
else
|
||||
{
|
||||
for (PotionEffectType type : PotionEffectType.values())
|
||||
player.removePotionEffect(type);
|
||||
|
||||
for (Iterator<PotionEffect> iterator = player.getActivePotionEffects().iterator(); iterator.hasNext();)
|
||||
{
|
||||
player.removePotionEffect(iterator.next().getType());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user