Abstraction is good.

This commit is contained in:
gmcferrin
2013-01-10 09:26:01 -05:00
parent c1463c3257
commit 607d2b8bd7
7 changed files with 49 additions and 116 deletions

View File

@ -4,23 +4,16 @@ import org.bukkit.entity.Player;
import org.bukkit.event.entity.EntityDamageEvent;
import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.datatypes.PlayerProfile;
import com.gmail.nossr50.datatypes.SkillType;
import com.gmail.nossr50.skills.SkillManager;
import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.Users;
public class AcrobaticsManager {
public class AcrobaticsManager extends SkillManager {
private static Config config = Config.getInstance();
private Player player;
private PlayerProfile profile;
private int skillLevel;
public AcrobaticsManager (Player player) {
this.player = player;
this.profile = Users.getProfile(player);
this.skillLevel = profile.getSkillLevel(SkillType.ACROBATICS);
super(player, SkillType.ACROBATICS);
}
/**
@ -88,16 +81,4 @@ public class AcrobaticsManager {
eventHandler.processXPGain(eventHandler.damage * Acrobatics.DODGE_XP_MODIFIER);
}
}
protected Player getPlayer() {
return player;
}
protected PlayerProfile getProfile() {
return profile;
}
protected int getSkillLevel() {
return skillLevel;
}
}