mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 19:54:44 +02:00
Abstraction is good.
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user