1.12.2 Get damage beforce strength is apllied

Discussion in 'Spigot Plugin Development' started by uiytt, Mar 21, 2020.

  1. Hello,
    I want to modify the damage added by strength.
    For this, I use EntityDamageByEntityEvent#getDamage() but it seems like the strength effect is already applied. And I didn't found any more idea of how to do that that don't involve strength method.
    Do you have any idea ?
    thanks ^^
  2. So without the code it is very difficult to find a fault in you're source code with out having it (=
  3. What ? I don't have any error...
    I'm just searching for a solution to get a damage without the strength in it.
    But if you want :/
    Code (Text):
    package fr.uiytt.pvptweaks.events;

    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.entity.EntityDamageByEntityEvent;

    import fr.uiytt.pvptweaks.Config;

    public class ForceModifier implements Listener{

        public void PlayerDamagedByPlayer(EntityDamageByEntityEvent event) {
            if(!(event.getDamager() instanceof Player)) {
            Double damage = event.getDamage();
    This send me the damage WITH strength in it !!
  4. Oh, I've misunderstood it
  5. Sorry /:
    I have unfortunately not worked on the damage indicators so far, I am sorry ):
  6. No problem, thanks anyway ^^