2012-06-15 03:10:47 +02:00
|
|
|
package com.gmail.nossr50.skills.unarmed;
|
|
|
|
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
2013-01-16 15:08:45 +01:00
|
|
|
import com.gmail.nossr50.locale.LocaleLoader;
|
2013-01-30 17:53:51 +01:00
|
|
|
import com.gmail.nossr50.skills.utilities.SkillType;
|
2012-06-15 03:10:47 +02:00
|
|
|
import com.gmail.nossr50.util.Misc;
|
2012-06-25 14:52:20 +02:00
|
|
|
import com.gmail.nossr50.util.Users;
|
2012-06-15 03:10:47 +02:00
|
|
|
|
|
|
|
public class IronGripEventHandler {
|
|
|
|
private UnarmedManager manager;
|
|
|
|
private Player defender;
|
|
|
|
protected int skillModifier;
|
|
|
|
|
|
|
|
protected IronGripEventHandler(UnarmedManager manager, Player defender) {
|
|
|
|
this.manager = manager;
|
|
|
|
this.defender = defender;
|
|
|
|
|
|
|
|
calculateSkillModifier();
|
|
|
|
}
|
|
|
|
|
|
|
|
protected void calculateSkillModifier() {
|
2013-01-22 17:18:12 +01:00
|
|
|
this.skillModifier = Misc.skillCheck(Users.getProfile(defender).getSkillLevel(SkillType.UNARMED), Unarmed.ironGripMaxBonusLevel);
|
2012-06-15 03:10:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
protected void sendAbilityMessages() {
|
2013-01-16 15:08:45 +01:00
|
|
|
defender.sendMessage(LocaleLoader.getString("Unarmed.Ability.IronGrip.Defender"));
|
2013-02-01 06:38:25 +01:00
|
|
|
manager.getMcMMOPlayer().getPlayer().sendMessage(LocaleLoader.getString("Unarmed.Ability.IronGrip.Attacker"));
|
2012-06-15 03:10:47 +02:00
|
|
|
}
|
|
|
|
}
|