Cancel lava's damage if the lava was made by a team member

Discussion in 'Plugin Development' started by Hugi21, Dec 17, 2015.

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

    Hugi21

    Hello ,

    Today I ask for help when a player takes damage due to washing, check that the lava was asked by a member of the player's team takes the damage and undo the damage in this case .

    Anti avoid short Thurs So I ask for help from the Bukkit community to help me.

    thank you beforehand
    Best regards
    Hugi21
     
    Last edited: Dec 17, 2015
  2. Offline

    mcdorli

    This is not the spigot community
     
    teej107 likes this.
  3. Offline

    Gorbit99

    "damage due to washing, check that lava was asked by a member of the player's team"
    Google translate strikes again
     
  4. Offline

    Zombie_Striker

    @Hugi21
    1. Find a way to store if the lava was placed by a player
    2. When a player gets damaged by lava, check if the block the player is in was placed by a player.
    3. If so, stop all flame ticks and set damage to 0.
     
  5. Offline

    Gorbit99

    @Zombie_Striker One problem: flowing lava. If you ignore it, it'll still hurt players, if you don't then what would you do with two different lava sources flown together?
     
  6. Offline

    thorvaldemar

    I don't know if this will work but you can try it out:

    1) make a hashmap to store blocks and intgear
    2) make a place block event
    3) test if the block is lava
    4) add the block to the hashmap and (for example if we say it is blue team who set it) the block will get the number 1
    5) then test if the player is damaged and if hi is test for the block in him is the number 1
    6) if the number is 1 cancel the event
     
Thread Status:
Not open for further replies.

Share This Page