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

@ -9,22 +9,14 @@ import org.bukkit.event.entity.ExplosionPrimeEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import com.gmail.nossr50.mcMMO;
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 MiningManager {
private Player player;
private PlayerProfile profile;
private int skillLevel;
public class MiningManager extends SkillManager{
public MiningManager (Player player) {
this.player = player;
this.profile = Users.getProfile(player);
this.skillLevel = profile.getSkillLevel(SkillType.MINING);
super(player, SkillType.MINING);
}
/**
@ -174,16 +166,4 @@ public class MiningManager {
eventHandler.processDropsAndXP();
eventHandler.playSpoutSound();
}
protected int getSkillLevel() {
return skillLevel;
}
protected Player getPlayer() {
return player;
}
protected PlayerProfile getProfile() {
return profile;
}
}