Fire Resistance potion for 8:00 mins

Discussion in 'Plugin Development' started by [Begginer Dev]Perfectly, Aug 12, 2016.

Thread Status:
Not open for further replies.
  1. Im trying to give the player fire resistsnce potion for 8 minuts but I cant find how.

    thanks for evrybody who is helping
     
  2. Offline

    Zombie_Striker

  3. I just search 1 hour in google
     
  4. Offline

    Marti201

    Use Player#addPotionEffect().
    The constructor for PotionEffect is PotionEffect(PotionEffectType.YOUREFFECT, durationInTicks, amplifier).
    There are 20 ticks in a second, which means 8 mins = 480 secs = 9600 ticks.
     
  5. There is no way without it?
     
  6. Offline

    timtower Administrator Administrator Moderator

    What other way are you looking for then?
     
  7. Offline

    Zombie_Striker

    @[Begginer Dev]Perfectly
    Considering the first result gives you the answer, I don't know why you spent an hour there.
    Unless you mean you want to be able to give a potion effect without code, I don't know what you meant by this. That method is the easiest way to add a potion effect.
     
  8. Offline

    Luwie

    if you are using bukkit are you meaning to do like /effect <PLAYER> FIRE_RESISTANCE <duration> <amplifier>
     
  9. Offline

    HeartandSoul

    We will not spoonfeed you. I'm sorry to be one of those guys to link you to the Docs for Bukkit, but....
    http://wiki.bukkit.org/Main_Page
     
  10. Offline

    Zombie_Striker

    That would mean the the console would have to dispatch this command (which means using a plugin to send a command, which is overkill for this), and commands would display that the command was sent, so this could spam the chat.

    Don't be sorry. We are here to help other members. We are not here to do their job for them.
     
Thread Status:
Not open for further replies.

Share This Page