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