mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 03:04:44 +02:00
Refactoring + adding a new skillranks config (not functional yet)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
package com.gmail.nossr50.skills;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -12,9 +12,9 @@ import com.gmail.nossr50.util.skills.PerksUtils;
|
||||
public abstract class SkillManager {
|
||||
protected McMMOPlayer mcMMOPlayer;
|
||||
protected int activationChance;
|
||||
protected PrimarySkill skill;
|
||||
protected PrimarySkillType skill;
|
||||
|
||||
public SkillManager(McMMOPlayer mcMMOPlayer, PrimarySkill skill) {
|
||||
public SkillManager(McMMOPlayer mcMMOPlayer, PrimarySkillType skill) {
|
||||
this.mcMMOPlayer = mcMMOPlayer;
|
||||
this.activationChance = PerksUtils.handleLuckyPerks(mcMMOPlayer.getPlayer(), skill);
|
||||
this.skill = skill;
|
||||
|
@ -1,20 +1,13 @@
|
||||
package com.gmail.nossr50.skills.acrobatics;
|
||||
|
||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.listeners.InteractionManager;
|
||||
import com.gmail.nossr50.util.skills.SkillActivationType;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LightningStrike;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
@ -26,7 +19,7 @@ import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
public class AcrobaticsManager extends SkillManager {
|
||||
|
||||
public AcrobaticsManager(McMMOPlayer mcMMOPlayer) {
|
||||
super(mcMMOPlayer, PrimarySkill.ACROBATICS);
|
||||
super(mcMMOPlayer, PrimarySkillType.ACROBATICS);
|
||||
}
|
||||
|
||||
public boolean canDodge(Entity damager) {
|
||||
|
@ -2,12 +2,12 @@ package com.gmail.nossr50.skills.alchemy;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||
import com.gmail.nossr50.config.skills.alchemy.PotionConfig;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.datatypes.skills.alchemy.PotionStage;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
@ -17,7 +17,7 @@ public class AlchemyManager extends SkillManager {
|
||||
private final double LUCKY_MODIFIER = 4.0 / 3.0;
|
||||
|
||||
public AlchemyManager(McMMOPlayer mcMMOPlayer) {
|
||||
super(mcMMOPlayer, PrimarySkill.ALCHEMY);
|
||||
super(mcMMOPlayer, PrimarySkillType.ALCHEMY);
|
||||
}
|
||||
|
||||
public int getTier() {
|
||||
|
@ -11,7 +11,7 @@ import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
@ -21,7 +21,7 @@ import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
|
||||
public class ArcheryManager extends SkillManager {
|
||||
public ArcheryManager(McMMOPlayer mcMMOPlayer) {
|
||||
super(mcMMOPlayer, PrimarySkill.ARCHERY);
|
||||
super(mcMMOPlayer, PrimarySkillType.ARCHERY);
|
||||
}
|
||||
|
||||
public boolean canDaze(LivingEntity target) {
|
||||
|
@ -2,6 +2,7 @@ package com.gmail.nossr50.skills.axes;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||
import com.gmail.nossr50.util.skills.*;
|
||||
@ -11,7 +12,6 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageModifier;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.ToolType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
@ -21,7 +21,7 @@ import com.gmail.nossr50.util.player.UserManager;
|
||||
|
||||
public class AxesManager extends SkillManager {
|
||||
public AxesManager(McMMOPlayer mcMMOPlayer) {
|
||||
super(mcMMOPlayer, PrimarySkill.AXES);
|
||||
super(mcMMOPlayer, PrimarySkillType.AXES);
|
||||
}
|
||||
|
||||
public boolean canUseAxeMastery() {
|
||||
|
@ -2,7 +2,7 @@ package com.gmail.nossr50.skills.child;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
import com.gmail.nossr50.config.AutoUpdateConfigLoader;
|
||||
@ -20,15 +20,15 @@ public class ChildConfig extends AutoUpdateConfigLoader {
|
||||
|
||||
FamilyTree.clearRegistrations(); // when reloading, need to clear statics
|
||||
|
||||
for (PrimarySkill skill : PrimarySkill.CHILD_SKILLS) {
|
||||
for (PrimarySkillType skill : PrimarySkillType.CHILD_SKILLS) {
|
||||
plugin.debug("Finding parents of " + skill.name());
|
||||
|
||||
EnumSet<PrimarySkill> parentSkills = EnumSet.noneOf(PrimarySkill.class);
|
||||
EnumSet<PrimarySkillType> parentSkills = EnumSet.noneOf(PrimarySkillType.class);
|
||||
boolean useDefaults = false; // If we had an error we back out and use defaults
|
||||
|
||||
for (String name : config.getStringList(StringUtils.getCapitalized(skill.name()))) {
|
||||
try {
|
||||
PrimarySkill parentSkill = PrimarySkill.valueOf(name.toUpperCase());
|
||||
PrimarySkillType parentSkill = PrimarySkillType.valueOf(name.toUpperCase());
|
||||
FamilyTree.enforceNotChildSkill(parentSkill);
|
||||
parentSkills.add(parentSkill);
|
||||
}
|
||||
@ -46,12 +46,12 @@ public class ChildConfig extends AutoUpdateConfigLoader {
|
||||
* If they're dedicated enough to have modified it, they can have the errors it may produce.
|
||||
* Alternatively, this can be used to allow child skills to be parent skills, provided there are no circular dependencies this is an advanced sort of configuration.
|
||||
*/
|
||||
parentSkills.add(PrimarySkill.valueOf(name.toUpperCase()));
|
||||
parentSkills.add(PrimarySkillType.valueOf(name.toUpperCase()));
|
||||
}
|
||||
}
|
||||
|
||||
// Register them
|
||||
for (PrimarySkill parentSkill : parentSkills) {
|
||||
for (PrimarySkillType parentSkill : parentSkills) {
|
||||
plugin.debug("Registering " + parentSkill.name() + " as parent of " + skill.name());
|
||||
FamilyTree.registerParent(skill, parentSkill);
|
||||
}
|
||||
|
@ -5,32 +5,32 @@ import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
|
||||
public class FamilyTree {
|
||||
private static HashMap<PrimarySkill, Set<PrimarySkill>> tree = new HashMap<PrimarySkill, Set<PrimarySkill>>();
|
||||
private static HashMap<PrimarySkillType, Set<PrimarySkillType>> tree = new HashMap<PrimarySkillType, Set<PrimarySkillType>>();
|
||||
|
||||
public static Set<PrimarySkill> getParents(PrimarySkill childSkill) {
|
||||
public static Set<PrimarySkillType> getParents(PrimarySkillType childSkill) {
|
||||
enforceChildSkill(childSkill);
|
||||
|
||||
// We do not check if we have the child skill in question, as not having it would mean we did something wrong, and an NPE is desired.
|
||||
return tree.get(childSkill);
|
||||
}
|
||||
|
||||
protected static void registerParent(PrimarySkill childSkill, PrimarySkill parentSkill) {
|
||||
protected static void registerParent(PrimarySkillType childSkill, PrimarySkillType parentSkill) {
|
||||
enforceChildSkill(childSkill);
|
||||
enforceNotChildSkill(parentSkill);
|
||||
|
||||
if (!tree.containsKey(childSkill)) {
|
||||
tree.put(childSkill, EnumSet.noneOf(PrimarySkill.class));
|
||||
tree.put(childSkill, EnumSet.noneOf(PrimarySkillType.class));
|
||||
}
|
||||
|
||||
tree.get(childSkill).add(parentSkill);
|
||||
}
|
||||
|
||||
protected static void closeRegistration() {
|
||||
for (PrimarySkill childSkill : tree.keySet()) {
|
||||
Set<PrimarySkill> immutableSet = Collections.unmodifiableSet(tree.get(childSkill));
|
||||
for (PrimarySkillType childSkill : tree.keySet()) {
|
||||
Set<PrimarySkillType> immutableSet = Collections.unmodifiableSet(tree.get(childSkill));
|
||||
tree.put(childSkill, immutableSet);
|
||||
}
|
||||
}
|
||||
@ -39,13 +39,13 @@ public class FamilyTree {
|
||||
tree.clear();
|
||||
}
|
||||
|
||||
protected static void enforceChildSkill(PrimarySkill skill) {
|
||||
protected static void enforceChildSkill(PrimarySkillType skill) {
|
||||
if (!skill.isChildSkill()) {
|
||||
throw new IllegalArgumentException(skill.name() + " is not a child skill!");
|
||||
}
|
||||
}
|
||||
|
||||
protected static void enforceNotChildSkill(PrimarySkill skill) {
|
||||
protected static void enforceNotChildSkill(PrimarySkillType skill) {
|
||||
if (skill.isChildSkill()) {
|
||||
throw new IllegalArgumentException(skill.name() + " is a child skill!");
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package com.gmail.nossr50.skills.excavation;
|
||||
|
||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.treasure.ExcavationTreasure;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
@ -26,7 +26,7 @@ public class Excavation {
|
||||
}
|
||||
|
||||
protected static int getBlockXP(BlockState blockState) {
|
||||
int xp = ExperienceConfig.getInstance().getXp(PrimarySkill.EXCAVATION, blockState.getType());
|
||||
int xp = ExperienceConfig.getInstance().getXp(PrimarySkillType.EXCAVATION, blockState.getType());
|
||||
|
||||
if (xp == 0 && mcMMO.getModManager().isCustomExcavationBlock(blockState)) {
|
||||
xp = mcMMO.getModManager().getBlock(blockState).getXpGain();
|
||||
|
@ -2,7 +2,7 @@ package com.gmail.nossr50.skills.excavation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.BlockState;
|
||||
|
||||
@ -18,7 +18,7 @@ import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
|
||||
public class ExcavationManager extends SkillManager {
|
||||
public ExcavationManager(McMMOPlayer mcMMOPlayer) {
|
||||
super(mcMMOPlayer, PrimarySkill.EXCAVATION);
|
||||
super(mcMMOPlayer, PrimarySkillType.EXCAVATION);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,7 +5,7 @@ import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.datatypes.treasure.EnchantmentTreasure;
|
||||
@ -50,7 +50,7 @@ public class FishingManager extends SkillManager {
|
||||
private Location hookLocation;
|
||||
|
||||
public FishingManager(McMMOPlayer mcMMOPlayer) {
|
||||
super(mcMMOPlayer, PrimarySkill.FISHING);
|
||||
super(mcMMOPlayer, PrimarySkillType.FISHING);
|
||||
}
|
||||
|
||||
public boolean canShake(Entity target) {
|
||||
@ -281,7 +281,7 @@ public class FishingManager extends SkillManager {
|
||||
*/
|
||||
public void handleFishing(Item fishingCatch) {
|
||||
this.fishingCatch = fishingCatch;
|
||||
int fishXp = ExperienceConfig.getInstance().getXp(PrimarySkill.FISHING, fishingCatch.getItemStack().getType());
|
||||
int fishXp = ExperienceConfig.getInstance().getXp(PrimarySkillType.FISHING, fishingCatch.getItemStack().getType());
|
||||
int treasureXp = 0;
|
||||
Player player = getPlayer();
|
||||
FishingTreasure treasure = null;
|
||||
|
@ -28,7 +28,7 @@ import java.util.List;
|
||||
|
||||
public class HerbalismManager extends SkillManager {
|
||||
public HerbalismManager(McMMOPlayer mcMMOPlayer) {
|
||||
super(mcMMOPlayer, PrimarySkill.HERBALISM);
|
||||
super(mcMMOPlayer, PrimarySkillType.HERBALISM);
|
||||
}
|
||||
|
||||
public boolean canBlockCheck() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.gmail.nossr50.skills.mining;
|
||||
|
||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import org.bukkit.Material;
|
||||
@ -16,7 +16,7 @@ public class Mining {
|
||||
* @param blockState The {@link BlockState} to check ability activation for
|
||||
*/
|
||||
public static int getBlockXp(BlockState blockState) {
|
||||
int xp = ExperienceConfig.getInstance().getXp(PrimarySkill.MINING, blockState.getType());
|
||||
int xp = ExperienceConfig.getInstance().getXp(PrimarySkillType.MINING, blockState.getType());
|
||||
|
||||
if (xp == 0 && mcMMO.getModManager().isCustomMiningBlock(blockState)) {
|
||||
xp = mcMMO.getModManager().getBlock(blockState).getXpGain();
|
||||
|
@ -3,8 +3,8 @@ package com.gmail.nossr50.skills.mining;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
@ -31,7 +31,7 @@ import java.util.List;
|
||||
|
||||
public class MiningManager extends SkillManager {
|
||||
public MiningManager(McMMOPlayer mcMMOPlayer) {
|
||||
super(mcMMOPlayer, PrimarySkill.MINING);
|
||||
super(mcMMOPlayer, PrimarySkillType.MINING);
|
||||
}
|
||||
|
||||
public boolean canUseDemolitionsExpertise() {
|
||||
|
@ -3,8 +3,8 @@ package com.gmail.nossr50.skills.repair;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
@ -20,7 +20,6 @@ import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
import com.gmail.nossr50.util.sounds.SoundManager;
|
||||
import com.gmail.nossr50.util.sounds.SoundType;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@ -34,7 +33,7 @@ public class RepairManager extends SkillManager {
|
||||
private int lastClick;
|
||||
|
||||
public RepairManager(McMMOPlayer mcMMOPlayer) {
|
||||
super(mcMMOPlayer, PrimarySkill.REPAIR);
|
||||
super(mcMMOPlayer, PrimarySkillType.REPAIR);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,7 @@ package com.gmail.nossr50.skills.salvage;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
@ -17,7 +17,6 @@ import com.gmail.nossr50.util.sounds.SoundManager;
|
||||
import com.gmail.nossr50.util.sounds.SoundType;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@ -31,7 +30,7 @@ public class SalvageManager extends SkillManager {
|
||||
private int lastClick;
|
||||
|
||||
public SalvageManager(McMMOPlayer mcMMOPlayer) {
|
||||
super(mcMMOPlayer, PrimarySkill.SALVAGE);
|
||||
super(mcMMOPlayer, PrimarySkillType.SALVAGE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,7 @@ package com.gmail.nossr50.skills.smelting;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
@ -44,6 +44,6 @@ public class Smelting {
|
||||
public static double fluxMiningChance = AdvancedConfig.getInstance().getFluxMiningChance();
|
||||
|
||||
protected static int getResourceXp(ItemStack smelting) {
|
||||
return mcMMO.getModManager().isCustomOre(smelting.getType()) ? mcMMO.getModManager().getBlock(smelting.getType()).getSmeltingXpGain() : ExperienceConfig.getInstance().getXp(PrimarySkill.SMELTING, smelting.getType());
|
||||
return mcMMO.getModManager().isCustomOre(smelting.getType()) ? mcMMO.getModManager().getBlock(smelting.getType()).getSmeltingXpGain() : ExperienceConfig.getInstance().getXp(PrimarySkillType.SMELTING, smelting.getType());
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ package com.gmail.nossr50.skills.smelting;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.events.skills.secondaryabilities.SubSkillWeightedActivationCheckEvent;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
@ -34,7 +34,7 @@ import java.util.List;
|
||||
|
||||
public class SmeltingManager extends SkillManager {
|
||||
public SmeltingManager(McMMOPlayer mcMMOPlayer) {
|
||||
super(mcMMOPlayer, PrimarySkill.SMELTING);
|
||||
super(mcMMOPlayer, PrimarySkillType.SMELTING);
|
||||
}
|
||||
|
||||
public boolean canUseFluxMining(BlockState blockState) {
|
||||
|
@ -2,7 +2,7 @@ package com.gmail.nossr50.skills.swords;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||
import com.gmail.nossr50.util.skills.SkillActivationType;
|
||||
@ -24,7 +24,7 @@ import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
|
||||
public class SwordsManager extends SkillManager {
|
||||
public SwordsManager(McMMOPlayer mcMMOPlayer) {
|
||||
super(mcMMOPlayer, PrimarySkill.SWORDS);
|
||||
super(mcMMOPlayer, PrimarySkillType.SWORDS);
|
||||
}
|
||||
|
||||
public boolean canActivateAbility() {
|
||||
|
@ -5,7 +5,7 @@ import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.events.fake.FakeEntityTameEvent;
|
||||
@ -33,7 +33,7 @@ import java.util.List;
|
||||
|
||||
public class TamingManager extends SkillManager {
|
||||
public TamingManager(McMMOPlayer mcMMOPlayer) {
|
||||
super(mcMMOPlayer, PrimarySkill.TAMING);
|
||||
super(mcMMOPlayer, PrimarySkillType.TAMING);
|
||||
}
|
||||
|
||||
private static HashMap<EntityType, List<TrackedTamingEntity>> summonedEntities = new HashMap<EntityType, List<TrackedTamingEntity>>();
|
||||
|
@ -4,7 +4,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.ToolType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
@ -26,7 +26,7 @@ import org.bukkit.block.data.BlockData;
|
||||
|
||||
public class UnarmedManager extends SkillManager {
|
||||
public UnarmedManager(McMMOPlayer mcMMOPlayer) {
|
||||
super(mcMMOPlayer, PrimarySkill.UNARMED);
|
||||
super(mcMMOPlayer, PrimarySkillType.UNARMED);
|
||||
}
|
||||
|
||||
public boolean canActivateAbility() {
|
||||
|
@ -3,7 +3,7 @@ package com.gmail.nossr50.skills.woodcutting;
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.BlockUtils;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
@ -43,7 +43,7 @@ public final class Woodcutting {
|
||||
return mcMMO.getModManager().getBlock(blockState).getXpGain();
|
||||
}
|
||||
|
||||
return ExperienceConfig.getInstance().getXp(PrimarySkill.WOODCUTTING, blockState.getType());
|
||||
return ExperienceConfig.getInstance().getXp(PrimarySkillType.WOODCUTTING, blockState.getType());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4,7 +4,7 @@ import com.gmail.nossr50.datatypes.mods.CustomBlock;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkill;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
@ -26,7 +26,7 @@ import java.util.Set;
|
||||
public class WoodcuttingManager extends SkillManager {
|
||||
|
||||
public WoodcuttingManager(McMMOPlayer mcMMOPlayer) {
|
||||
super(mcMMOPlayer, PrimarySkill.WOODCUTTING);
|
||||
super(mcMMOPlayer, PrimarySkillType.WOODCUTTING);
|
||||
}
|
||||
|
||||
public boolean canUseLeafBlower(ItemStack heldItem) {
|
||||
|
Reference in New Issue
Block a user