Solved How to change the amount of damage a zombie does to a player?

Discussion in 'Plugin Development' started by cwhit0814, Feb 6, 2016.

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

    cwhit0814

    I am making an RPG like plugin and I need to make zombies do different amount of damages at different levels. Would I need to use NMS or use events to do this. I have personally never used NMS but if I need to use it I will definitely use it.
     
  2. Offline

    q8minecraft

    In EntityDamageByEntiyEvent; check for the mob, and the damaged entity, then set the event damage to the damage you want.
     
  3. Offline

    cwhit0814

    so I would use event.setAmount(event.getAmmount + 1); For example.
     
  4. Offline

    q8minecraft

  5. Offline

    cwhit0814

    What would I do to set the health of an entity with the creature spawn event
     
  6. Offline

    JoaoBM

    @cwhit0814 You can only change the entity health on CreatureSpawnEvent under certain limits: 0 - EntityMaxHealth. I believe if you want to the the MaxHealth, then you need to create a CustomLivingEntity
     
Thread Status:
Not open for further replies.

Share This Page