Fix metal taking too little damage with full iron (#203)

This commit is contained in:
Sam 2016-09-11 03:47:52 +01:00 committed by Shaun Bennett
parent 23a330d449
commit 38473dcffd

View File

@ -6,6 +6,7 @@ import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.Action; import org.bukkit.event.block.Action;
import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.block.BlockPlaceEvent;
@ -50,7 +51,7 @@ public class PerkMagnetism extends Perk
_magnituideFactor = magnitudeFactor; _magnituideFactor = magnitudeFactor;
} }
@EventHandler @EventHandler(priority = EventPriority.HIGHEST)
public void onCustomDamage(CustomDamageEvent event) public void onCustomDamage(CustomDamageEvent event)
{ {
if (!(event.GetDamageeEntity() instanceof Player)) if (!(event.GetDamageeEntity() instanceof Player))
@ -67,7 +68,7 @@ public class PerkMagnetism extends Perk
int magnitude = getAmountOfMetalArmor(player); int magnitude = getAmountOfMetalArmor(player);
event.AddMod(GetName(), event.GetDamage() * (magnitude * -0.075)); event.AddMod(GetName(), event.GetDamage() * (magnitude * -0.05));
} }
@EventHandler @EventHandler