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,21 +4,14 @@ import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.entity.EntityDamageEvent;
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 ArcheryManager {
private Player player;
private PlayerProfile profile;
private int skillLevel;
public class ArcheryManager extends SkillManager {
public ArcheryManager (Player player) {
this.player = player;
this.profile = Users.getProfile(player);
this.skillLevel = profile.getSkillLevel(SkillType.ARCHERY);
super(player, SkillType.ARCHERY);
}
/**
@ -88,12 +81,4 @@ public class ArcheryManager {
eventHandler.modifyEventDamage();
}
}
protected int getSkillLevel() {
return skillLevel;
}
protected Player getPlayer() {
return player;
}
}