Simple code not working idk why? [solved]

Discussion in 'Spigot Plugin Help' started by dmb219910, Jun 10, 2016.

  1. Code (Text):
    package me.dmb219910;

    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.player.PlayerToggleSprintEvent;
    import org.bukkit.potion.PotionEffect;
    import org.bukkit.potion.PotionEffectType;

    import net.md_5.bungee.api.ChatColor;

    public class PlayerListener extends JavaPlugin  implements Listener{

        public PlayerListener(StartUp plugin) {
            plugin.getServer().getPluginManager().registerEvents(this, plugin);

        public void OnSprint (PlayerToggleSprintEvent e ) {
            Player player = e.getPlayer();
            player.addPotionEffect((new PotionEffect(PotionEffectType.CONFUSION, 200, 10)));  

    Im making a confusion effect when the player toggles sprint for some reason the plugins yml is right its showing up in green when doing /pl i don't know what the problem is its probably some stupid reason that i didn't see with my eye it would be much appreciative if someone can point it out
  2. Never Mind i solved IT!