Avoid a few unnecessary calls.

This commit is contained in:
GJ 2013-01-21 19:36:15 -05:00
parent 7f8beca33c
commit 67fd45ef25
2 changed files with 2 additions and 7 deletions

View File

@ -19,8 +19,6 @@ public class DisarmEventHandler {
this.manager = manager;
this.defender = defender;
this.inHand = defender.getItemInHand();
calculateSkillModifier();
}
protected boolean isHoldingItem() {
@ -31,7 +29,7 @@ public class DisarmEventHandler {
this.skillModifier = Misc.skillCheck(manager.getSkillLevel(), Unarmed.DISARM_MAX_BONUS_LEVEL);
}
protected void sendAbilityMessage() {
private void sendAbilityMessage() {
defender.sendMessage(LocaleLoader.getString("Skills.Disarmed"));
}

View File

@ -19,10 +19,7 @@ public class UnarmedManager extends SkillManager {
* @param defender The defending player
*/
public void disarmCheck(Player defender) {
if (player == null)
return;
if (!Permissions.disarm(player)) {
if (Misc.isNPC(player) || !Permissions.disarm(player)) {
return;
}