Is there any way to set the DamageCause of the damage function?

Discussion in 'Spigot Plugin Help' started by MikuScarlet, Feb 27, 2020.

  1. I found the Damagable's damage function only for params "int amount" or "int value, Entity source".
    But I found nothing about setting the DamageCause.
    Can I set the DamageCause like void, entityattack, etc?
    For I call damage function(to make an aoe damage) in the EntityDamagedByEntity event? It may cause a cycle.

    thanks.:D

    (sorry for my poor English)
     
  2. Any one?…:(:cry:
    I try to make player a scoreboardtag to tag the player damage type and remove it after completing the event which call the damage function.
    But I guess there must exists a better way to make it.
     
  3. As far as I know I dont think there is. The Damage Cause is automatically defined when a player takes damage.
     
  4. thx, I got it.

    could you help me a question?
    If I want to make a multy damage calls in the EntityDamagedByEntity, was there a better way to make it?
     
  5. Sorry but I'm afraid I can't be of much help, I'm not really that advanced into Java.
     
  6. anyway, Thanks for your help :D