Add CalculateDamage() to API.

dev
sigonasr2 9 years ago
parent ec10a46889
commit aefb3fedca
  1. BIN
      TwosideKeeper.jar
  2. 14
      src/sig/plugin/TwosideKeeper/TwosideKeeperAPI.java

Binary file not shown.

@ -181,6 +181,20 @@ public final class TwosideKeeperAPI {
return CustomDamage.ApplyDamage(damage, damager, target, weapon, reason, flags);
}
/**
* Returns how much damage would be dealt with this particular calculation of damage dealt. Uses same exact arguments as applyDamage.
* @param damage
* @param damager
* @param target
* @param weapon
* @param reason
* @param flags
* @return
*/
public static double CalculateDamage(double damage, Entity damager, LivingEntity target, ItemStack weapon, String reason, int flags) {
return CustomDamage.CalculateDamage(damage, damager, target, weapon, reason, flags);
}
/**
* Returns the string of the last damage reason the player took. All attacks in the game except
* for basic attacks from monsters and projectiles (which makes this return null) have a reason.

Loading…
Cancel
Save