Effect

Discussion in 'Plugin Development' started by Amrefinium, Jul 15, 2013.

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

    Amrefinium

    Im looking for the code that allows the player to have a nausea effect after teleporting.​

    ive used this for teleporting...​

    Code:
    if(blockId == 345){
     
    Block block = player.getTargetBlock(null, 200);
     
    Location teleportLoc = block.getLocation();
     
    teleportLoc.setY(teleportLoc.getY() + 1.5);
     
    player.teleport(teleportLoc);
     
    Player = player.addPotionEffect(9);

    I just cant seem to figure out how to add the nausea effect after this.​
    please help, thanks​
     
  2. player.addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION, {put the amount of ticks you want the player to have the effect for}, {effect strength}));

    Example:
    player.addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION, 20, 1));
     
Thread Status:
Not open for further replies.

Share This Page