Damage multiplier if shot

Discussion in 'Plugin Development' started by Aspecting, Apr 14, 2016.

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

    Aspecting

    I have an event for when a player gets damaged by a bow, but how could I give them increased damage for 10 seconds?
     
  2. Offline

    Lightspeed

    Increase all damage or sword damage?

    For just a simple sword damage you can give them the strenght potion effect.

    For all damage you can add players to a hashmap with a 10 second delay then watch EntityDamageByEntityEvent
    setting the damage to be the damage + multipler(An integer).

    When the player gets damage by a bow you can add the damager to a list or hashmap and then schedule a task to remove said player from list after 20 * 10 ticks.

    If your going to store a player in a hashmap or list please use there UUID.

    Note: You can use a hashmap to continue increasing the damage multipler every time you shoot someone even with a max multipler if you really want.

    Just tell me if you need any help with anything. ;)
     
  3. Offline

    ShowbizLocket61

    The point of a damage multiplier is that you multiply it to the damage, not add it :D
     
  4. Offline

    Lightspeed

    Multiple could mean * x . . . . . . . . . Im not stupid I SWARE! XD
     
    ShowbizLocket61 likes this.
Thread Status:
Not open for further replies.

Share This Page