Damage power ups?

Discussion in 'Plugin Development' started by kingsofbart, Sep 15, 2015.

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

    kingsofbart

    Hello,

    How can i make easy that if some one gets damage he ll gets some resistance.
    If there are 5 seconds left and he hit he will again become resistance but if the 5 seconds not have nothing must happen.
    How can I make this the best?

    Bye, Bart
     
  2. Offline

    timtower Administrator Administrator Moderator

    Moved to plugin development.
     
  3. Offline

    kingsofbart

    Sorry for that.
     
  4. Offline

    FabeGabeMC

  5. Offline

    kingsofbart

  6. Offline

    FabeGabeMC

    @kingsofbart You can create an anonymous BukkitRunnable instance and use the runTaskLater() method to make a timer.
    Note: You will need an instance of your JavaPlugin class/main class.
    Note 2: The second parameter are based in ticks, so multiply the number by 20 if you want to use seconds (ex: 1 = 1 tick or 1/20 of a second, so if I want to use 1 second, 20 = 1 second/20 ticks).
    Tip: use the cancel() method to cancel the timer.
     
  7. Offline

    kingsofbart

    thanks!
     
  8. Offline

    FabeGabeMC

Thread Status:
Not open for further replies.

Share This Page