Solved Potion effects not working

Discussion in 'Plugin Development' started by vhbob, Dec 6, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    vhbob

    Hey, im trying to give a player a potion effect but it will not work, heres the code:
    Code:
    public void haste1(BlockDamageEvent e) {
            Player p = e.getPlayer();
            if (getConfig().getString(p.getName() + " h1").equalsIgnoreCase("yes")) {
            p.addPotionEffect( new PotionEffect(PotionEffectType.FAST_DIGGING, 200, 1));
            }
        }
    
    heres the config:
    Code:
    vhbob bal: 0
    vhbob fly: 'yes'
    vhbob h1: 'yes'
    
     
  2. Offline

    mcdorli

    @EventHandler
     
  3. Offline

    vhbob

Thread Status:
Not open for further replies.

Share This Page