Fixed bug with parkour enchantment checks.

This commit is contained in:
Jonathan Williams 2014-10-31 17:03:06 -07:00
parent b5ef46007f
commit 45da22b0bf

View File

@ -20,6 +20,7 @@ import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerVelocityEvent; import org.bukkit.event.player.PlayerVelocityEvent;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionEffectType;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -192,8 +193,11 @@ public class ParkourManager extends MiniPlugin
} }
else else
{ {
for (PotionEffectType type : PotionEffectType.values())
player.removePotionEffect(type); for (Iterator<PotionEffect> iterator = player.getActivePotionEffects().iterator(); iterator.hasNext();)
{
player.removePotionEffect(iterator.next().getType());
}
} }
} }
} }