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,16 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
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 TamingManager {
|
||||
private Player player;
|
||||
private PlayerProfile profile;
|
||||
private int skillLevel;
|
||||
public class TamingManager extends SkillManager {
|
||||
private Config configInstance;
|
||||
|
||||
public TamingManager (Player player) {
|
||||
this.player = player;
|
||||
this.profile = Users.getProfile(player);
|
||||
this.skillLevel = profile.getSkillLevel(SkillType.TAMING);
|
||||
super(player, SkillType.TAMING);
|
||||
this.configInstance = Config.getInstance();
|
||||
}
|
||||
|
||||
@ -282,12 +276,4 @@ public class TamingManager {
|
||||
eventHandler.modifyEventDamage();
|
||||
}
|
||||
}
|
||||
|
||||
protected int getSkillLevel() {
|
||||
return skillLevel;
|
||||
}
|
||||
|
||||
protected Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user