Mineplex2018-withcommit/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkAxeman.java
Jonathan Williams 3fb52c5c71 Initial Commit
2013-08-27 08:14:08 -07:00

42 lines
910 B
Java

package nautilus.game.arcade.kit.perks;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import mineplex.core.common.util.C;
import nautilus.game.arcade.kit.Perk;
public class PerkAxeman extends Perk
{
public PerkAxeman()
{
super("Axe Master", new String[]
{
C.cGray + "Deals +1 Damage with Axes",
});
}
@EventHandler(priority = EventPriority.HIGH)
public void AxeDamage(CustomDamageEvent event)
{
if (event.IsCancelled())
return;
Player damager = event.GetDamagerPlayer(false);
if (damager == null) return;
if (damager.getItemInHand() == null)
return;
if (!damager.getItemInHand().getType().toString().contains("_AXE"))
return;
if (!Kit.HasKit(damager))
return;
event.AddMod(damager.getName(), GetName(), 1, false);
}
}