Class DamageUtil
java.lang.Object
me.deecaad.weaponmechanics.weapon.damage.DamageUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanapply(org.bukkit.entity.LivingEntity cause, org.bukkit.entity.LivingEntity victim, double damage) static booleancanHarmScoreboardTeams(org.bukkit.entity.LivingEntity cause, org.bukkit.entity.LivingEntity victim) static voiddamageArmor(org.bukkit.entity.LivingEntity victim, int amount) static voiddamageArmor(org.bukkit.entity.LivingEntity victim, int amount, @Nullable DamagePoint point) static booleanisWhitelisted(org.bukkit.entity.EntityType type) Mobs without spawn eggs didn't have statistics associated with them before 1.13.
-
Method Details
-
apply
public static boolean apply(org.bukkit.entity.LivingEntity cause, org.bukkit.entity.LivingEntity victim, double damage) - Parameters:
cause- The shooter that caused the damage.victim- The victim being damaged.damage- The amount of damage to apply- Returns:
- true if damage was cancelled
-
isWhitelisted
public static boolean isWhitelisted(org.bukkit.entity.EntityType type) Mobs without spawn eggs didn't have statistics associated with them before 1.13. See https://bugs.mojang.com/browse/MC-33710.- Parameters:
type- The entity type.- Returns:
- false if there is no statistic.
-
damageArmor
public static void damageArmor(org.bukkit.entity.LivingEntity victim, int amount) -
damageArmor
public static void damageArmor(org.bukkit.entity.LivingEntity victim, int amount, @Nullable @Nullable DamagePoint point) -
canHarmScoreboardTeams
public static boolean canHarmScoreboardTeams(org.bukkit.entity.LivingEntity cause, org.bukkit.entity.LivingEntity victim) - Parameters:
cause- the cause entity (shooter of projectile)victim- the victim- Returns:
- true only if cause can harm victim
-