mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-01 08:09:39 +01:00
Fixing some more classes broken in the static abuse removal edits
This commit is contained in:
parent
32d9eaab3d
commit
297ce64a24
@ -7,8 +7,10 @@ public class PartyTeleportRecord {
|
||||
private Player requestor;
|
||||
private boolean enabled, confirmRequired;
|
||||
private int timeout, lastUse;
|
||||
private final mcMMO pluginRef;
|
||||
|
||||
public PartyTeleportRecord(mcMMO pluginRef) {
|
||||
this.pluginRef = pluginRef;
|
||||
requestor = null;
|
||||
enabled = true;
|
||||
confirmRequired = pluginRef.getConfigManager().getConfigParty().getPTP().isPtpAcceptRequired();
|
||||
|
@ -25,7 +25,7 @@ public class Roll extends AcrobaticsSubSkill {
|
||||
private final mcMMO pluginRef;
|
||||
|
||||
public Roll(mcMMO pluginRef) {
|
||||
super("Roll", EventPriority.HIGHEST, SubSkillType.ACROBATICS_ROLL);
|
||||
super(pluginRef, "Roll", EventPriority.HIGHEST, SubSkillType.ACROBATICS_ROLL);
|
||||
this.pluginRef = pluginRef;
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ public class MiningManager extends SkillManager {
|
||||
|
||||
applyXpGain(miningBehaviour.getBlockXp(blockState), XPGainReason.PVE);
|
||||
|
||||
if (mcMMOPlayer.getSuperAbilityMode(skill.getSuperAbility())) {
|
||||
if (mcMMOPlayer.getSuperAbilityMode(pluginRef.getSkillTools().getSuperAbility(skill))) {
|
||||
pluginRef.getSkillTools().handleDurabilityChange(getPlayer().getInventory().getItemInMainHand(), pluginRef.getConfigManager().getConfigSuperAbilities().getSuperAbilityLimits().getToolDurabilityDamage());
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ public class MiningManager extends SkillManager {
|
||||
|
||||
//TODO: Make this readable
|
||||
if (pluginRef.getRandomChanceTools().checkRandomChanceExecutionSuccess(getPlayer(), SubSkillType.MINING_DOUBLE_DROPS)) {
|
||||
pluginRef.getBlockTools().markDropsAsBonus(blockState, mcMMOPlayer.getSuperAbilityMode(skill.getSuperAbility()));
|
||||
pluginRef.getBlockTools().markDropsAsBonus(blockState, mcMMOPlayer.getSuperAbilityMode(pluginRef.getSkillTools().getSuperAbility(skill)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -128,7 +128,9 @@ public class MiningManager extends SkillManager {
|
||||
|
||||
mcMMOPlayer.setAbilityDATS(SuperAbilityType.BLAST_MINING, System.currentTimeMillis());
|
||||
mcMMOPlayer.setAbilityInformed(SuperAbilityType.BLAST_MINING, false);
|
||||
new AbilityCooldownTask(pluginRef, mcMMOPlayer, SuperAbilityType.BLAST_MINING).runTaskLater(pluginRef, SuperAbilityType.BLAST_MINING.getCooldown() * pluginRef.getMiscTools().TICK_CONVERSION_FACTOR);
|
||||
new AbilityCooldownTask(pluginRef, mcMMOPlayer, SuperAbilityType.BLAST_MINING)
|
||||
.runTaskLater(pluginRef, pluginRef.getSkillTools().getSuperAbilityCooldown(SuperAbilityType.BLAST_MINING)
|
||||
* pluginRef.getMiscTools().TICK_CONVERSION_FACTOR);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -403,7 +403,7 @@ public class ScoreboardWrapper {
|
||||
case SKILL_BOARD:
|
||||
Validate.notNull(targetSkill);
|
||||
|
||||
if (!targetSkill.isChildSkill()) {
|
||||
if (!pluginRef.getSkillTools().isChildSkill(targetSkill)) {
|
||||
int currentXP = mcMMOPlayer.getSkillXpLevel(targetSkill);
|
||||
|
||||
sidebarObjective.getScore(scoreboardStrings.LABEL_CURRENT_XP).setScore(currentXP);
|
||||
@ -416,7 +416,7 @@ public class ScoreboardWrapper {
|
||||
|
||||
sidebarObjective.getScore(scoreboardStrings.LABEL_LEVEL).setScore(mcMMOPlayer.getSkillLevel(targetSkill));
|
||||
|
||||
if (targetSkill.getSuperAbility() != null) {
|
||||
if (pluginRef.getSkillTools().getSuperAbility(targetSkill) != null) {
|
||||
boolean stopUpdating;
|
||||
|
||||
if (targetSkill == PrimarySkillType.MINING) {
|
||||
@ -431,7 +431,7 @@ public class ScoreboardWrapper {
|
||||
|
||||
stopUpdating = (secondsSB == 0 && secondsBM == 0);
|
||||
} else {
|
||||
SuperAbilityType ability = targetSkill.getSuperAbility();
|
||||
SuperAbilityType ability = pluginRef.getSkillTools().getSuperAbility(targetSkill);
|
||||
Score cooldown = sidebarObjective.getScore(scoreboardStrings.abilityLabelsSkill.get(ability));
|
||||
int seconds = Math.max(mcMMOPlayer.calculateTimeRemaining(ability), 0);
|
||||
|
||||
@ -482,17 +482,17 @@ public class ScoreboardWrapper {
|
||||
|
||||
// Calculate power level here
|
||||
int powerLevel = 0;
|
||||
for (PrimarySkillType skill : pluginRef.getSkillTools().NON_CHILD_SKILLS) { // Don't include child skills, makes the list too long
|
||||
int level = newProfile.getSkillLevel(skill);
|
||||
for (PrimarySkillType primarySkillType : pluginRef.getSkillTools().NON_CHILD_SKILLS) { // Don't include child skills, makes the list too long
|
||||
int level = newProfile.getSkillLevel(primarySkillType);
|
||||
|
||||
powerLevel += level;
|
||||
|
||||
// TODO: Verify that this is what we want - calculated in power level but not displayed
|
||||
if (!skill.doesPlayerHaveSkillPermission(player)) {
|
||||
if (!pluginRef.getPermissionTools().skillEnabled(player, primarySkillType)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
sidebarObjective.getScore(scoreboardStrings.skillLabels.get(skill)).setScore(level);
|
||||
sidebarObjective.getScore(scoreboardStrings.skillLabels.get(primarySkillType)).setScore(level);
|
||||
}
|
||||
|
||||
sidebarObjective.getScore(scoreboardStrings.LABEL_POWER_LEVEL).setScore(powerLevel);
|
||||
@ -515,15 +515,15 @@ public class ScoreboardWrapper {
|
||||
Integer rank;
|
||||
Player player = pluginRef.getServer().getPlayerExact(playerName);
|
||||
|
||||
for (PrimarySkillType skill : pluginRef.getSkillTools().NON_CHILD_SKILLS) {
|
||||
if (!skill.doesPlayerHaveSkillPermission(player)) {
|
||||
for (PrimarySkillType primarySkillType : pluginRef.getSkillTools().NON_CHILD_SKILLS) {
|
||||
if (!pluginRef.getPermissionTools().skillEnabled(player, primarySkillType)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
rank = rankData.get(skill);
|
||||
rank = rankData.get(primarySkillType);
|
||||
|
||||
if (rank != null) {
|
||||
sidebarObjective.getScore(scoreboardStrings.skillLabels.get(skill)).setScore(rank);
|
||||
sidebarObjective.getScore(scoreboardStrings.skillLabels.get(primarySkillType)).setScore(rank);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user