Shake sends custom damagecause

This commit is contained in:
nossr50 2019-01-16 11:07:11 -08:00
parent f1feeed670
commit a59907fcec
2 changed files with 3 additions and 1 deletions

View File

@ -78,6 +78,7 @@ Version 2.1.0
! (Skills) Axe's Impact now uses a rank system ! (Skills) Axe's Impact now uses a rank system
! (Skills) Herbalism's Farmer's Diet now uses a rank system ! (Skills) Herbalism's Farmer's Diet now uses a rank system
! (Skills) Herbalism's Green Thumb now uses a rank system ! (Skills) Herbalism's Green Thumb now uses a rank system
= (Skills) Shake now sends custom damage types for better nocheat compat
! (Config) Unarmed.IronArm in advanced.yml is now Unarmed.IronArmStyle ! (Config) Unarmed.IronArm in advanced.yml is now Unarmed.IronArmStyle
! (Config) Unarmed.Deflect in advanced.yml is now Unarmed.ArrowDeflect ! (Config) Unarmed.Deflect in advanced.yml is now Unarmed.ArrowDeflect
! (Config) Swords.Counter in advanced.yml is now Swords.CounterAttack ! (Config) Swords.Counter in advanced.yml is now Swords.CounterAttack

View File

@ -31,6 +31,7 @@ import org.bukkit.block.Block;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
import org.bukkit.enchantments.Enchantment; import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.*; import org.bukkit.entity.*;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory; import org.bukkit.inventory.PlayerInventory;
@ -439,7 +440,7 @@ public class FishingManager extends SkillManager {
} }
Misc.dropItem(target.getLocation(), drop); Misc.dropItem(target.getLocation(), drop);
CombatUtils.dealDamage(target, Math.max(target.getMaxHealth() / 4, 1), getPlayer()); // Make it so you can shake a mob no more than 4 times. CombatUtils.dealDamage(target, Math.max(target.getMaxHealth() / 4, 1), EntityDamageEvent.DamageCause.CUSTOM, getPlayer()); // Make it so you can shake a mob no more than 4 times.
applyXpGain(ExperienceConfig.getInstance().getFishingShakeXP(), XPGainReason.PVE); applyXpGain(ExperienceConfig.getInstance().getFishingShakeXP(), XPGainReason.PVE);
} }
} }