mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
SecondaryAbility's API additions
This commit is contained in:
parent
5d63a4b910
commit
870987bba7
@ -8,11 +8,13 @@ Key:
|
||||
- Removal
|
||||
|
||||
Version 1.4.08-dev
|
||||
+ Added SecondaryAbilityType enum, and new SecondaryAbilityWeightedActivationCheckEvent, fired when a secondary ability checkes its activation chances
|
||||
+ Added the possibility to gain experience when using Fishing "Shake"
|
||||
+ Added config options to disable various sound effects
|
||||
+ Smelting now works with custom ores - add smelting XP value to blocks.yml, or it will default to 1/10th of normal XP.
|
||||
+ Added automatic cleanup of backups folder.
|
||||
+ Added bypass permission for finding Fishing traps
|
||||
= Fixed bug where LeafBlower permissions were ignored
|
||||
= Fixed bug with toggle commands not properly displaying the success message.
|
||||
= Fixed IllegalArgumentException caused by an empty Fishing treasure category
|
||||
= Fixed bug with Salvage not reading the config value for the anvil material.
|
||||
@ -20,6 +22,8 @@ Version 1.4.08-dev
|
||||
= Fixed bug where the Unbreaking enchantment was ignored when using "Super Breaker" or "Giga Drill Breaker"
|
||||
= Fixed bug which prevented players from gaining Acrobatics XP when the setting 'Prevent_XP_After_Teleport' was set to false
|
||||
! Updated localization files
|
||||
! Changed AxesCritical to CriticalHit in config file
|
||||
! Changed several secondary ability permissions(deprecated versions still exist)
|
||||
|
||||
Version 1.4.07
|
||||
+ Added XP boost to Acrobatics when wearing Boots of Feather Falling
|
||||
|
@ -41,7 +41,7 @@ public class MccooldownCommand implements TabExecutor {
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Cooldowns.Header"));
|
||||
player.sendMessage(LocaleLoader.getString("mcMMO.NoSkillNote"));
|
||||
|
||||
for (AbilityType ability : AbilityType.NORMAL_ABILITIES) {
|
||||
for (AbilityType ability : AbilityType.values()) {
|
||||
if (!ability.getPermissions(player)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -5,9 +5,9 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.acrobatics.Acrobatics;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
|
||||
public class AcrobaticsCommand extends SkillCommand {
|
||||
@ -30,21 +30,21 @@ public class AcrobaticsCommand extends SkillCommand {
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// DODGE
|
||||
if (canDodge) {
|
||||
String[] dodgeStrings = calculateAbilityDisplayValues(skillValue, Acrobatics.dodgeMaxBonusLevel, Acrobatics.dodgeMaxChance, isLucky);
|
||||
String[] dodgeStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.DODGE, isLucky);
|
||||
dodgeChance = dodgeStrings[0];
|
||||
dodgeChanceLucky = dodgeStrings[1];
|
||||
}
|
||||
|
||||
// ROLL
|
||||
if (canRoll) {
|
||||
String[] rollStrings = calculateAbilityDisplayValues(skillValue, Acrobatics.rollMaxBonusLevel, Acrobatics.rollMaxChance, isLucky);
|
||||
String[] rollStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.ROLL, isLucky);
|
||||
rollChance = rollStrings[0];
|
||||
rollChanceLucky = rollStrings[1];
|
||||
}
|
||||
|
||||
// GRACEFUL ROLL
|
||||
if (canGracefulRoll) {
|
||||
String[] gracefulRollStrings = calculateAbilityDisplayValues(skillValue, Acrobatics.gracefulRollMaxBonusLevel, Acrobatics.gracefulRollMaxChance, isLucky);
|
||||
String[] gracefulRollStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.GRACEFUL_ROLL, isLucky);
|
||||
gracefulRollChance = gracefulRollStrings[0];
|
||||
gracefulRollChanceLucky = gracefulRollStrings[1];
|
||||
}
|
||||
@ -52,9 +52,9 @@ public class AcrobaticsCommand extends SkillCommand {
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canDodge = Permissions.dodge(player);
|
||||
canRoll = Permissions.roll(player);
|
||||
canGracefulRoll = Permissions.gracefulRoll(player);
|
||||
canDodge = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.DODGE);
|
||||
canRoll = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.ROLL);
|
||||
canGracefulRoll = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.GRACEFUL_ROLL);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.archery.Archery;
|
||||
@ -35,14 +36,14 @@ public class ArcheryCommand extends SkillCommand {
|
||||
|
||||
// DAZE
|
||||
if (canDaze) {
|
||||
String[] dazeStrings = calculateAbilityDisplayValues(skillValue, Archery.dazeMaxBonusLevel, Archery.dazeMaxBonus, isLucky);
|
||||
String[] dazeStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.DAZE, isLucky);
|
||||
dazeChance = dazeStrings[0];
|
||||
dazeChanceLucky = dazeStrings[1];
|
||||
}
|
||||
|
||||
// RETRIEVE
|
||||
if (canRetrieve) {
|
||||
String[] retrieveStrings = calculateAbilityDisplayValues(skillValue, Archery.retrieveMaxBonusLevel, Archery.retrieveMaxChance, isLucky);
|
||||
String[] retrieveStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.RETRIEVE, isLucky);
|
||||
retrieveChance = retrieveStrings[0];
|
||||
retrieveChanceLucky = retrieveStrings[1];
|
||||
}
|
||||
@ -50,9 +51,9 @@ public class ArcheryCommand extends SkillCommand {
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canSkillShot = Permissions.bonusDamage(player, skill);
|
||||
canDaze = Permissions.daze(player);
|
||||
canRetrieve = Permissions.arrowRetrieval(player);
|
||||
canSkillShot = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.SKILL_SHOT);
|
||||
canDaze = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.DAZE);
|
||||
canRetrieve = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.RETRIEVE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.axes.Axes;
|
||||
@ -13,14 +14,14 @@ import com.gmail.nossr50.util.Permissions;
|
||||
public class AxesCommand extends SkillCommand {
|
||||
private String critChance;
|
||||
private String critChanceLucky;
|
||||
private double bonusDamage;
|
||||
private double axeMasteryDamage;
|
||||
private double impactDamage;
|
||||
private String skullSplitterLength;
|
||||
private String skullSplitterLengthEndurance;
|
||||
|
||||
private boolean canSkullSplitter;
|
||||
private boolean canCritical;
|
||||
private boolean canBonusDamage;
|
||||
private boolean canAxeMastery;
|
||||
private boolean canImpact;
|
||||
private boolean canGreaterImpact;
|
||||
|
||||
@ -30,7 +31,7 @@ public class AxesCommand extends SkillCommand {
|
||||
|
||||
@Override
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
// IMPACT
|
||||
// ARMOR IMPACT
|
||||
if (canImpact) {
|
||||
impactDamage = 1 + (skillValue / Axes.impactIncreaseLevel);
|
||||
}
|
||||
@ -42,26 +43,26 @@ public class AxesCommand extends SkillCommand {
|
||||
skullSplitterLengthEndurance = skullSplitterStrings[1];
|
||||
}
|
||||
|
||||
// CRITICAL STRIKES
|
||||
// CRITICAL HIT
|
||||
if (canCritical) {
|
||||
String[] criticalStrikeStrings = calculateAbilityDisplayValues(skillValue, Axes.criticalHitMaxBonusLevel, Axes.criticalHitMaxChance, isLucky);
|
||||
critChance = criticalStrikeStrings[0];
|
||||
critChanceLucky = criticalStrikeStrings[1];
|
||||
String[] criticalHitStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.CRITICAL_HIT, isLucky);
|
||||
critChance = criticalHitStrings[0];
|
||||
critChanceLucky = criticalHitStrings[1];
|
||||
}
|
||||
|
||||
// AXE MASTERY
|
||||
if (canBonusDamage) {
|
||||
bonusDamage = Math.min(skillValue / (Axes.bonusDamageMaxBonusLevel / Axes.bonusDamageMaxBonus), Axes.bonusDamageMaxBonus);
|
||||
if (canAxeMastery) {
|
||||
axeMasteryDamage = Math.min(skillValue / (Axes.axeMasteryMaxBonusLevel / Axes.axeMasteryMaxBonus), Axes.axeMasteryMaxBonus);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canSkullSplitter = Permissions.skullSplitter(player);
|
||||
canCritical = Permissions.criticalStrikes(player);
|
||||
canBonusDamage = Permissions.bonusDamage(player, skill);
|
||||
canImpact = Permissions.armorImpact(player);
|
||||
canGreaterImpact = Permissions.greaterImpact(player);
|
||||
canCritical = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.CRITICAL_HIT);
|
||||
canAxeMastery = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.AXE_MASTERY);
|
||||
canImpact = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.ARMOR_IMPACT);
|
||||
canGreaterImpact = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.GREATER_IMPACT);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -76,7 +77,7 @@ public class AxesCommand extends SkillCommand {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.2"), LocaleLoader.getString("Axes.Effect.3")));
|
||||
}
|
||||
|
||||
if (canBonusDamage) {
|
||||
if (canAxeMastery) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.4"), LocaleLoader.getString("Axes.Effect.5")));
|
||||
}
|
||||
|
||||
@ -95,8 +96,8 @@ public class AxesCommand extends SkillCommand {
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canBonusDamage) {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.0"), LocaleLoader.getString("Axes.Ability.Bonus.1", bonusDamage)));
|
||||
if (canAxeMastery) {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.0"), LocaleLoader.getString("Axes.Ability.Bonus.1", axeMasteryDamage)));
|
||||
}
|
||||
|
||||
if (canImpact) {
|
||||
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
@ -33,7 +34,7 @@ public class ExcavationCommand extends SkillCommand {
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canGigaDrill = Permissions.gigaDrillBreaker(player);
|
||||
canTreasureHunt = Permissions.excavationTreasureHunter(player);
|
||||
canTreasureHunt = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.EXCAVATION_TREASURE_HUNTER);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -10,6 +10,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.treasure.Rarity;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
@ -114,12 +115,12 @@ public class FishingCommand extends SkillCommand {
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canTreasureHunt = Permissions.fishingTreasureHunter(player);
|
||||
canMagicHunt = Permissions.magicHunter(player);
|
||||
canShake = Permissions.shake(player);
|
||||
canFishermansDiet = Permissions.fishermansDiet(player);
|
||||
canMasterAngler = Permissions.masterAngler(player);
|
||||
canIceFish = Permissions.iceFishing(player);
|
||||
canTreasureHunt = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.FISHING_TREASURE_HUNTER);
|
||||
canMagicHunt = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.MAGIC_HUNTER);
|
||||
canShake = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.SHAKE);
|
||||
canFishermansDiet = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.FISHERMANS_DIET);
|
||||
canMasterAngler = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.MASTER_ANGLER);
|
||||
canIceFish = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.ICE_FISHING);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -6,6 +6,7 @@ import java.util.List;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.herbalism.Herbalism;
|
||||
@ -55,28 +56,28 @@ public class HerbalismCommand extends SkillCommand {
|
||||
if (canGreenThumbBlocks || canGreenThumbPlants) {
|
||||
greenThumbStage = calculateRank(skillValue, Herbalism.greenThumbStageMaxLevel, Herbalism.greenThumbStageChangeLevel);
|
||||
|
||||
String[] greenThumbStrings = calculateAbilityDisplayValues(skillValue, Herbalism.greenThumbMaxLevel, Herbalism.greenThumbMaxChance, isLucky);
|
||||
String[] greenThumbStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.GREEN_THUMB_PLANT, isLucky);
|
||||
greenThumbChance = greenThumbStrings[0];
|
||||
greenThumbChanceLucky = greenThumbStrings[1];
|
||||
}
|
||||
|
||||
// DOUBLE DROPS
|
||||
if (canDoubleDrop) {
|
||||
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, Herbalism.doubleDropsMaxLevel, Herbalism.doubleDropsMaxChance, isLucky);
|
||||
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.HERBALISM_DOUBLE_DROPS, isLucky);
|
||||
doubleDropChance = doubleDropStrings[0];
|
||||
doubleDropChanceLucky = doubleDropStrings[1];
|
||||
}
|
||||
|
||||
// HYLIAN LUCK
|
||||
if (hasHylianLuck) {
|
||||
String[] hylianLuckStrings = calculateAbilityDisplayValues(skillValue, Herbalism.hylianLuckMaxLevel, Herbalism.hylianLuckMaxChance, isLucky);
|
||||
String[] hylianLuckStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.HYLIAN_LUCK, isLucky);
|
||||
hylianLuckChance = hylianLuckStrings[0];
|
||||
hylianLuckChanceLucky = hylianLuckStrings[1];
|
||||
}
|
||||
|
||||
// SHROOM THUMB
|
||||
if (canShroomThumb) {
|
||||
String[] shroomThumbStrings = calculateAbilityDisplayValues(skillValue, Herbalism.shroomThumbMaxLevel, Herbalism.shroomThumbMaxChance, isLucky);
|
||||
String[] shroomThumbStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.SHROOM_THUMB, isLucky);
|
||||
shroomThumbChance = shroomThumbStrings[0];
|
||||
shroomThumbChanceLucky = shroomThumbStrings[1];
|
||||
}
|
||||
@ -84,13 +85,13 @@ public class HerbalismCommand extends SkillCommand {
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
hasHylianLuck = Permissions.hylianLuck(player);
|
||||
hasHylianLuck = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.HYLIAN_LUCK);
|
||||
canGreenTerra = Permissions.greenTerra(player);
|
||||
canGreenThumbPlants = Permissions.greenThumbPlant(player, Material.CROPS) || Permissions.greenThumbPlant(player, Material.CARROT) || Permissions.greenThumbPlant(player, Material.POTATO) || Permissions.greenThumbPlant(player, Material.NETHER_WARTS) || Permissions.greenThumbPlant(player, Material.COCOA);
|
||||
canGreenThumbBlocks = Permissions.greenThumbBlock(player, Material.DIRT) || Permissions.greenThumbBlock(player, Material.COBBLESTONE) || Permissions.greenThumbBlock(player, Material.COBBLE_WALL) || Permissions.greenThumbBlock(player, Material.SMOOTH_BRICK);
|
||||
canFarmersDiet = Permissions.farmersDiet(player);
|
||||
canDoubleDrop = Permissions.doubleDrops(player, skill) && !skill.getDoubleDropsDisabled();
|
||||
canShroomThumb = Permissions.shroomThumb(player);
|
||||
canFarmersDiet = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.FARMERS_DIET);
|
||||
canDoubleDrop = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.HERBALISM_DOUBLE_DROPS) && !skill.getDoubleDropsDisabled();
|
||||
canShroomThumb = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.SHROOM_THUMB);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -6,10 +6,10 @@ import java.util.List;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.mining.BlastMining.Tier;
|
||||
import com.gmail.nossr50.skills.mining.Mining;
|
||||
import com.gmail.nossr50.skills.mining.MiningManager;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
@ -48,7 +48,7 @@ public class MiningCommand extends SkillCommand {
|
||||
|
||||
// DOUBLE DROPS
|
||||
if (canDoubleDrop) {
|
||||
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, Mining.doubleDropsMaxLevel, Mining.doubleDropsMaxChance, isLucky);
|
||||
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.MINING_DOUBLE_DROPS, isLucky);
|
||||
doubleDropChance = doubleDropStrings[0];
|
||||
doubleDropChanceLucky = doubleDropStrings[1];
|
||||
}
|
||||
@ -71,7 +71,7 @@ public class MiningCommand extends SkillCommand {
|
||||
canBiggerBombs = Permissions.biggerBombs(player);
|
||||
canBlast = Permissions.remoteDetonation(player);
|
||||
canDemoExpert = Permissions.demolitionsExpertise(player);
|
||||
canDoubleDrop = Permissions.doubleDrops(player, skill) && !skill.getDoubleDropsDisabled();
|
||||
canDoubleDrop = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.MINING_DOUBLE_DROPS) && !skill.getDoubleDropsDisabled();
|
||||
canSuperBreaker = Permissions.superBreaker(player);
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.repair.ArcaneForging;
|
||||
@ -65,7 +66,7 @@ public class RepairCommand extends SkillCommand {
|
||||
|
||||
// SUPER REPAIR
|
||||
if (canSuperRepair) {
|
||||
String[] superRepairStrings = calculateAbilityDisplayValues(skillValue, Repair.superRepairMaxBonusLevel, Repair.superRepairMaxChance, isLucky);
|
||||
String[] superRepairStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.SUPER_REPAIR, isLucky);
|
||||
superRepairChance = superRepairStrings[0];
|
||||
superRepairChanceLucky = superRepairStrings[1];
|
||||
}
|
||||
@ -73,10 +74,10 @@ public class RepairCommand extends SkillCommand {
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canSuperRepair = Permissions.superRepair(player);
|
||||
canMasterRepair = Permissions.repairMastery(player);
|
||||
canArcaneForge = Permissions.arcaneForging(player);
|
||||
canSalvage = Permissions.salvage(player);
|
||||
canSuperRepair = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.SUPER_REPAIR);
|
||||
canMasterRepair = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.REPAIR_MASTERY);
|
||||
canArcaneForge = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.ARCANE_FORGING);
|
||||
canSalvage = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.SALVAGE);
|
||||
canRepairDiamond = Permissions.repairDiamond(player);
|
||||
canRepairGold = Permissions.repairGold(player);
|
||||
canRepairIron = Permissions.repairIron(player);
|
||||
|
@ -13,6 +13,7 @@ import org.bukkit.entity.Player;
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.child.FamilyTree;
|
||||
@ -136,8 +137,10 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
return displayValues;
|
||||
}
|
||||
|
||||
protected String[] calculateAbilityDisplayValues(float skillValue, int maxBonusLevel, double maxChance, boolean isLucky) {
|
||||
return calculateAbilityDisplayValues((maxChance / maxBonusLevel) * Math.min(skillValue, maxBonusLevel), isLucky);
|
||||
protected String[] calculateAbilityDisplayValues(float skillValue, SecondaryAbilityType skillAbility, boolean isLucky) {
|
||||
int maxBonusLevel = AdvancedConfig.getInstance().getMaxBonusLevel(skillAbility);
|
||||
|
||||
return calculateAbilityDisplayValues((AdvancedConfig.getInstance().getMaxChance(skillAbility) / maxBonusLevel) * Math.min(skillValue, maxBonusLevel), isLucky);
|
||||
}
|
||||
|
||||
protected String[] calculateLengthDisplayValues(Player player, float skillValue) {
|
||||
|
@ -6,6 +6,7 @@ import java.util.List;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.smelting.Smelting;
|
||||
@ -38,7 +39,7 @@ public class SmeltingCommand extends SkillCommand {
|
||||
|
||||
// SECOND SMELT
|
||||
if (canSecondSmelt) {
|
||||
String[] secondSmeltStrings = calculateAbilityDisplayValues(skillValue, Smelting.secondSmeltMaxLevel, Smelting.secondSmeltMaxChance, isLucky);
|
||||
String[] secondSmeltStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.SECOND_SMELT, isLucky);
|
||||
secondSmeltChance = secondSmeltStrings[0];
|
||||
secondSmeltChanceLucky = secondSmeltStrings[1];
|
||||
}
|
||||
@ -53,9 +54,9 @@ public class SmeltingCommand extends SkillCommand {
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canFuelEfficiency = Permissions.fuelEfficiency(player);
|
||||
canSecondSmelt = Permissions.doubleDrops(player, skill);
|
||||
canFluxMine = Permissions.fluxMining(player);
|
||||
canFuelEfficiency = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.FUEL_EFFICIENCY);
|
||||
canSecondSmelt = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.SECOND_SMELT);
|
||||
canFluxMine = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.FLUX_MINING);
|
||||
canVanillaXPBoost = Permissions.vanillaXpBoost(player, skill);
|
||||
}
|
||||
|
||||
|
@ -5,14 +5,16 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.swords.Swords;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
|
||||
public class SwordsCommand extends SkillCommand {
|
||||
private String counterAttackChance;
|
||||
private String counterAttackChanceLucky;
|
||||
private String counterChance;
|
||||
private String counterChanceLucky;
|
||||
private int bleedLength;
|
||||
private String bleedChance;
|
||||
private String bleedChanceLucky;
|
||||
@ -38,25 +40,25 @@ public class SwordsCommand extends SkillCommand {
|
||||
|
||||
// BLEED
|
||||
if (canBleed) {
|
||||
bleedLength = (skillValue >= Swords.bleedMaxBonusLevel) ? Swords.bleedMaxTicks : Swords.bleedBaseTicks;
|
||||
bleedLength = (skillValue >= AdvancedConfig.getInstance().getMaxBonusLevel(SecondaryAbilityType.BLEED)) ? Swords.bleedMaxTicks : Swords.bleedBaseTicks;
|
||||
|
||||
String[] bleedStrings = calculateAbilityDisplayValues(skillValue, Swords.bleedMaxBonusLevel, Swords.bleedMaxChance, isLucky);
|
||||
String[] bleedStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.BLEED, isLucky);
|
||||
bleedChance = bleedStrings[0];
|
||||
bleedChanceLucky = bleedStrings[1];
|
||||
}
|
||||
|
||||
// COUNTER ATTACK
|
||||
// COUNTER
|
||||
if (canCounter) {
|
||||
String[] counterAttackStrings = calculateAbilityDisplayValues(skillValue, Swords.counterAttackMaxBonusLevel, Swords.counterAttackMaxChance, isLucky);
|
||||
counterAttackChance = counterAttackStrings[0];
|
||||
counterAttackChanceLucky = counterAttackStrings[1];
|
||||
String[] counterStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.COUNTER, isLucky);
|
||||
counterChance = counterStrings[0];
|
||||
counterChanceLucky = counterStrings[1];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canBleed = Permissions.bleed(player);
|
||||
canCounter = Permissions.counterAttack(player);
|
||||
canBleed = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.BLEED);
|
||||
canCounter = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.COUNTER);
|
||||
canSerratedStrike = Permissions.serratedStrikes(player);
|
||||
}
|
||||
|
||||
@ -85,7 +87,7 @@ public class SwordsCommand extends SkillCommand {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canCounter) {
|
||||
messages.add(LocaleLoader.getString("Swords.Combat.Counter.Chance", counterAttackChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", counterAttackChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Swords.Combat.Counter.Chance", counterChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", counterChanceLucky) : ""));
|
||||
}
|
||||
|
||||
if (canBleed) {
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.taming.Taming;
|
||||
@ -33,7 +34,7 @@ public class TamingCommand extends SkillCommand {
|
||||
@Override
|
||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||
if (canGore) {
|
||||
String[] goreStrings = calculateAbilityDisplayValues(skillValue, Taming.goreMaxBonusLevel, Taming.goreMaxChance, isLucky);
|
||||
String[] goreStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.GORE, isLucky);
|
||||
goreChance = goreStrings[0];
|
||||
goreChanceLucky = goreStrings[1];
|
||||
}
|
||||
@ -41,15 +42,15 @@ public class TamingCommand extends SkillCommand {
|
||||
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canBeastLore = Permissions.beastLore(player);
|
||||
canBeastLore = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.BEAST_LORE);
|
||||
canCallWild = Permissions.callOfTheWild(player, EntityType.HORSE) || Permissions.callOfTheWild(player, EntityType.WOLF) || Permissions.callOfTheWild(player, EntityType.OCELOT);
|
||||
canEnvironmentallyAware = Permissions.environmentallyAware(player);
|
||||
canFastFood = Permissions.fastFoodService(player);
|
||||
canGore = Permissions.gore(player);
|
||||
canSharpenedClaws = Permissions.sharpenedClaws(player);
|
||||
canShockProof = Permissions.shockProof(player);
|
||||
canThickFur = Permissions.thickFur(player);
|
||||
canHolyHound = Permissions.holyHound(player);
|
||||
canEnvironmentallyAware = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.ENVIROMENTALLY_AWARE);
|
||||
canFastFood = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.FAST_FOOD);
|
||||
canGore = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.GORE);
|
||||
canSharpenedClaws = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.SHARPENED_CLAWS);
|
||||
canShockProof = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.SHOCK_PROOF);
|
||||
canThickFur = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.THICK_FUR);
|
||||
canHolyHound = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.HOLY_HOUND);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.unarmed.Unarmed;
|
||||
@ -23,7 +24,7 @@ public class UnarmedCommand extends SkillCommand {
|
||||
|
||||
private boolean canBerserk;
|
||||
private boolean canDisarm;
|
||||
private boolean canBonusDamage;
|
||||
private boolean canIronArm;
|
||||
private boolean canDeflect;
|
||||
private boolean canIronGrip;
|
||||
|
||||
@ -42,26 +43,26 @@ public class UnarmedCommand extends SkillCommand {
|
||||
|
||||
// DISARM
|
||||
if (canDisarm) {
|
||||
String[] disarmStrings = calculateAbilityDisplayValues(skillValue, Unarmed.disarmMaxBonusLevel, Unarmed.disarmMaxChance, isLucky);
|
||||
String[] disarmStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.DISARM, isLucky);
|
||||
disarmChance = disarmStrings[0];
|
||||
disarmChanceLucky = disarmStrings[1];
|
||||
}
|
||||
|
||||
// DEFLECT
|
||||
if (canDeflect) {
|
||||
String[] deflectStrings = calculateAbilityDisplayValues(skillValue, Unarmed.deflectMaxBonusLevel, Unarmed.deflectMaxChance, isLucky);
|
||||
String[] deflectStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.DEFLECT, isLucky);
|
||||
deflectChance = deflectStrings[0];
|
||||
deflectChanceLucky = deflectStrings[1];
|
||||
}
|
||||
|
||||
// IRON ARM
|
||||
if (canBonusDamage) {
|
||||
if (canIronArm) {
|
||||
ironArmBonus = Math.min(3 + ((int) skillValue / Unarmed.ironArmIncreaseLevel), Unarmed.ironArmMaxBonusDamage);
|
||||
}
|
||||
|
||||
// IRON GRIP
|
||||
if (canIronGrip) {
|
||||
String[] ironGripStrings = calculateAbilityDisplayValues(skillValue, Unarmed.ironGripMaxBonusLevel, Unarmed.ironGripMaxChance, isLucky);
|
||||
String[] ironGripStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.IRON_GRIP, isLucky);
|
||||
ironGripChance = ironGripStrings[0];
|
||||
ironGripChanceLucky = ironGripStrings[1];
|
||||
}
|
||||
@ -70,10 +71,11 @@ public class UnarmedCommand extends SkillCommand {
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canBerserk = Permissions.berserk(player);
|
||||
canBonusDamage = Permissions.bonusDamage(player, skill);
|
||||
canDeflect = Permissions.arrowDeflect(player);
|
||||
canDisarm = Permissions.disarm(player);
|
||||
canIronGrip = Permissions.ironGrip(player);
|
||||
canIronArm = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.IRON_ARM);
|
||||
canDeflect = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.DEFLECT);
|
||||
canDisarm = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.DISARM);
|
||||
canIronGrip = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.IRON_GRIP);
|
||||
// TODO: Apparently we forgot about block cracker?
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -83,12 +85,13 @@ public class UnarmedCommand extends SkillCommand {
|
||||
if (canBerserk) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.0"), LocaleLoader.getString("Unarmed.Effect.1")));
|
||||
}
|
||||
// TODO: Apparently we forgot about block cracker?
|
||||
|
||||
if (canDisarm) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.2"), LocaleLoader.getString("Unarmed.Effect.3")));
|
||||
}
|
||||
|
||||
if (canBonusDamage) {
|
||||
if (canIronArm) {
|
||||
messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.4"), LocaleLoader.getString("Unarmed.Effect.5")));
|
||||
}
|
||||
|
||||
@ -107,7 +110,7 @@ public class UnarmedCommand extends SkillCommand {
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
if (canBonusDamage) {
|
||||
if (canIronArm) {
|
||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Unarmed.Ability.Bonus.0"), LocaleLoader.getString("Unarmed.Ability.Bonus.1", ironArmBonus)));
|
||||
}
|
||||
|
||||
|
@ -6,9 +6,9 @@ import java.util.List;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.woodcutting.Woodcutting;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
|
||||
public class WoodcuttingCommand extends SkillCommand {
|
||||
@ -36,7 +36,7 @@ public class WoodcuttingCommand extends SkillCommand {
|
||||
|
||||
// DOUBLE DROPS
|
||||
if (canDoubleDrop) {
|
||||
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, Woodcutting.doubleDropsMaxLevel, Woodcutting.doubleDropsMaxChance, isLucky);
|
||||
String[] doubleDropStrings = calculateAbilityDisplayValues(skillValue, SecondaryAbilityType.WOODCUTTING_DOUBLE_DROPS, isLucky);
|
||||
doubleDropChance = doubleDropStrings[0];
|
||||
doubleDropChanceLucky = doubleDropStrings[1];
|
||||
}
|
||||
@ -45,8 +45,8 @@ public class WoodcuttingCommand extends SkillCommand {
|
||||
@Override
|
||||
protected void permissionsCheck(Player player) {
|
||||
canTreeFell = Permissions.treeFeller(player);
|
||||
canDoubleDrop = Permissions.doubleDrops(player, skill) && !skill.getDoubleDropsDisabled();
|
||||
canLeafBlow = Permissions.leafBlower(player);
|
||||
canDoubleDrop = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.WOODCUTTING_DOUBLE_DROPS) && !skill.getDoubleDropsDisabled();
|
||||
canLeafBlow = Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.LEAF_BLOWER);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -4,10 +4,13 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.skills.fishing.Fishing;
|
||||
import com.gmail.nossr50.skills.mining.BlastMining;
|
||||
import com.gmail.nossr50.skills.repair.ArcaneForging;
|
||||
import com.gmail.nossr50.skills.smelting.Smelting;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
|
||||
public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
private static AdvancedConfig instance;
|
||||
@ -40,11 +43,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* ACROBATICS */
|
||||
if (getDodgeChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.DODGE) < 1) {
|
||||
reason.add("Skills.Acrobatics.Dodge.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getDodgeMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.DODGE) < 1) {
|
||||
reason.add("Skills.Acrobatics.Dodge.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@ -52,11 +55,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Acrobatics.Dodge.DamageModifier should be greater than 1!");
|
||||
}
|
||||
|
||||
if (getRollChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.ROLL) < 1) {
|
||||
reason.add("Skills.Acrobatics.Roll.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getRollMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.ROLL) < 1) {
|
||||
reason.add("Skills.Acrobatics.Roll.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@ -64,11 +67,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Acrobatics.Roll.DamageThreshold should be at least 0!");
|
||||
}
|
||||
|
||||
if (getGracefulRollChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.GRACEFUL_ROLL) < 1) {
|
||||
reason.add("Skills.Acrobatics.GracefulRoll.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getGracefulRollMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.GRACEFUL_ROLL) < 1) {
|
||||
reason.add("Skills.Acrobatics.GracefulRoll.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@ -89,11 +92,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Archery.SkillShot.MaxBonus should be at least 0!");
|
||||
}
|
||||
|
||||
if (getDazeBonusMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.DAZE) < 1) {
|
||||
reason.add("Skills.Acrobatics.Daze.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getDazeMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.DAZE) < 1) {
|
||||
reason.add("Skills.Acrobatics.Daze.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@ -101,11 +104,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Acrobatics.Daze.BonusDamage should be at least 0!");
|
||||
}
|
||||
|
||||
if (getRetrieveChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.RETRIEVE) < 1) {
|
||||
reason.add("Skills.Acrobatics.Retrieve.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getRetrieveMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.RETRIEVE) < 1) {
|
||||
reason.add("Skills.Acrobatics.Retrieve.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@ -114,28 +117,28 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* AXES */
|
||||
if (getBonusDamageAxesBonusMax() < 1) {
|
||||
reason.add("Skills.Axes.DamageIncrease.MaxBonus should be at least 1!");
|
||||
if (getAxeMasteryBonusMax() < 1) {
|
||||
reason.add("Skills.Axes.AxeMastery.MaxBonus should be at least 1!");
|
||||
}
|
||||
|
||||
if (getBonusDamageAxesMaxBonusLevel() < 1) {
|
||||
reason.add("Skills.Axes.DamageIncrease.MaxBonusLevel should be at least 1!");
|
||||
if (getAxeMasteryMaxBonusLevel() < 1) {
|
||||
reason.add("Skills.Axes.AxeMastery.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getAxesCriticalChance() < 1) {
|
||||
reason.add("Skills.Axes.AxesCritical.ChanceMax should be at least 1!");
|
||||
if (getMaxChance(SecondaryAbilityType.CRITICAL_HIT) < 1) {
|
||||
reason.add("Skills.Axes.CriticalHit.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getAxesCriticalMaxBonusLevel() < 1) {
|
||||
reason.add("Skills.Axes.AxesCritical.MaxBonusLevel should be at least 1!");
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.CRITICAL_HIT) < 1) {
|
||||
reason.add("Skills.Axes.CriticalHit.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getAxesCriticalPVPModifier() < 1) {
|
||||
reason.add("Skills.Axes.AxesCritical.PVP_Modifier should be at least 1!");
|
||||
if (getCriticalHitPVPModifier() < 1) {
|
||||
reason.add("Skills.Axes.CriticalHit.PVP_Modifier should be at least 1!");
|
||||
}
|
||||
|
||||
if (getAxesCriticalPVEModifier() < 1) {
|
||||
reason.add("Skills.Axes.AxesCritical.PVE_Modifier should be at least 1!");
|
||||
if (getCriticalHitPVEModifier() < 1) {
|
||||
reason.add("Skills.Axes.CriticalHit.PVE_Modifier should be at least 1!");
|
||||
}
|
||||
|
||||
if (getGreaterImpactChance() < 1) {
|
||||
@ -228,44 +231,44 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Herbalism.GreenThumb.StageChange should be at least 1!");
|
||||
}
|
||||
|
||||
if (getGreenThumbChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.GREEN_THUMB_PLANT) < 1) {
|
||||
reason.add("Skills.Herbalism.GreenThumb.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getGreenThumbMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.GREEN_THUMB_PLANT) < 1) {
|
||||
reason.add("Skills.Herbalism.GreenThumb.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getHerbalismDoubleDropsChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.HERBALISM_DOUBLE_DROPS) < 1) {
|
||||
reason.add("Skills.Herbalism.DoubleDrops.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getHerbalismDoubleDropsMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.HERBALISM_DOUBLE_DROPS) < 1) {
|
||||
reason.add("Skills.Herbalism.DoubleDrops.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getHylianLuckChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.HYLIAN_LUCK) < 1) {
|
||||
reason.add("Skills.Herbalism.HylianLuck.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getHylianLuckMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.HYLIAN_LUCK) < 1) {
|
||||
reason.add("Skills.Herbalism.HylianLuck.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getShroomThumbChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.SHROOM_THUMB) < 1) {
|
||||
reason.add("Skills.Herbalism.ShroomThumb.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getShroomThumbMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.SHROOM_THUMB) < 1) {
|
||||
reason.add("Skills.Herbalism.ShroomThumb.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
/* MINING */
|
||||
if (getMiningDoubleDropChance() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.MINING_DOUBLE_DROPS) < 1) {
|
||||
reason.add("Skills.Mining.DoubleDrops.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getMiningDoubleDropMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.MINING_DOUBLE_DROPS) < 1) {
|
||||
reason.add("Skills.Mining.DoubleDrops.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@ -334,11 +337,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Repair.RepairMastery.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getSuperRepairChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.SUPER_REPAIR) < 1) {
|
||||
reason.add("Skills.Repair.SuperRepair.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getSuperRepairMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.SUPER_REPAIR) < 1) {
|
||||
reason.add("Skills.Repair.SuperRepair.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@ -387,11 +390,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Smelting.FuelEfficiency.Multiplier should be at least 1!");
|
||||
}
|
||||
|
||||
if (getSecondSmeltMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.SECOND_SMELT) < 1) {
|
||||
reason.add("Skills.Smelting.SecondSmelt.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getSecondSmeltMaxChance() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.SECOND_SMELT) < 1) {
|
||||
reason.add("Skills.Smelting.SecondSmelt.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
@ -428,11 +431,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* SWORDS */
|
||||
if (getBleedChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.BLEED) < 1) {
|
||||
reason.add("Skills.Swords.Bleed.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getBleedMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.BLEED) < 1) {
|
||||
reason.add("Skills.Swords.Bleed.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@ -448,11 +451,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Swords.Bleed.BaseTicks should be at least 1!");
|
||||
}
|
||||
|
||||
if (getCounterChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.COUNTER) < 1) {
|
||||
reason.add("Skills.Swords.Counter.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getCounterMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.COUNTER) < 1) {
|
||||
reason.add("Skills.Swords.Counter.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@ -470,11 +473,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
|
||||
/* TAMING */
|
||||
|
||||
if (getGoreChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.GORE) < 1) {
|
||||
reason.add("Skills.Taming.Gore.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getGoreMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.GORE) < 1) {
|
||||
reason.add("Skills.Taming.Gore.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@ -531,27 +534,27 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
}
|
||||
|
||||
/* UNARMED */
|
||||
if (getDisarmChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.DISARM) < 1) {
|
||||
reason.add("Skills.Unarmed.Disarm.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getDisarmMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.DISARM) < 1) {
|
||||
reason.add("Skills.Unarmed.Disarm.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getDeflectChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.DEFLECT) < 1) {
|
||||
reason.add("Skills.Unarmed.Deflect.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getDeflectMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.DEFLECT) < 1) {
|
||||
reason.add("Skills.Unarmed.Deflect.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getIronGripChanceMax() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.IRON_GRIP) < 1) {
|
||||
reason.add("Skills.Unarmed.IronGrip.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getIronGripMaxBonusLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.IRON_GRIP) < 1) {
|
||||
reason.add("Skills.Unarmed.IronGrip.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@ -576,11 +579,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Woodcutting.LeafBlower.UnlockLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getWoodcuttingDoubleDropChance() < 1) {
|
||||
if (getMaxChance(SecondaryAbilityType.WOODCUTTING_DOUBLE_DROPS) < 1) {
|
||||
reason.add("Skills.Woodcutting.DoubleDrops.ChanceMax should be at least 1!");
|
||||
}
|
||||
|
||||
if (getWoodcuttingDoubleDropMaxLevel() < 1) {
|
||||
if (getMaxBonusLevel(SecondaryAbilityType.WOODCUTTING_DOUBLE_DROPS) < 1) {
|
||||
reason.add("Skills.Woodcutting.DoubleDrops.MaxBonusLevel should be at least 1!");
|
||||
}
|
||||
|
||||
@ -611,17 +614,14 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
public int getAbilityLength() { return config.getInt("Skills.General.Ability.IncreaseLevel", 50); }
|
||||
public int getEnchantBuff() { return config.getInt("Skills.General.Ability.EnchantBuff", 5); }
|
||||
|
||||
public int getMaxBonusLevel(SecondaryAbilityType skillAbility) { return config.getInt("Skills." + StringUtils.getCapitalized(SkillType.bySecondaryAbility(skillAbility).toString()) + "." + StringUtils.getPrettySecondaryAbilityString(skillAbility).replace("_", "") + "." + "MaxBonusLevel"); }
|
||||
public double getMaxChance(SecondaryAbilityType skillAbility) { return config.getDouble("Skills." + StringUtils.getCapitalized(SkillType.bySecondaryAbility(skillAbility).toString()) + "." + StringUtils.getPrettySecondaryAbilityString(skillAbility).replace("_", "") + "." + "ChanceMax", 100.0D); }
|
||||
|
||||
/* ACROBATICS */
|
||||
public double getDodgeChanceMax() { return config.getDouble("Skills.Acrobatics.Dodge.ChanceMax", 20.0D); }
|
||||
public int getDodgeMaxBonusLevel() { return config.getInt("Skills.Acrobatics.Dodge.MaxBonusLevel", 800); }
|
||||
public double getDodgeDamageModifier() { return config.getDouble("Skills.Acrobatics.Dodge.DamageModifier", 2.0D); }
|
||||
|
||||
public double getRollChanceMax() { return config.getDouble("Skills.Acrobatics.Roll.ChanceMax", 100.0D); }
|
||||
public int getRollMaxBonusLevel() { return config.getInt("Skills.Acrobatics.Roll.MaxBonusLevel", 1000); }
|
||||
public double getRollDamageThreshold() { return config.getDouble("Skills.Acrobatics.Roll.DamageThreshold", 7.0D); }
|
||||
|
||||
public double getGracefulRollChanceMax() { return config.getDouble("Skills.Acrobatics.GracefulRoll.ChanceMax", 100.0D); }
|
||||
public int getGracefulRollMaxBonusLevel() { return config.getInt("Skills.Acrobatics.GracefulRoll.MaxBonusLevel", 500); }
|
||||
public double getGracefulRollDamageThreshold() { return config.getDouble("Skills.Acrobatics.GracefulRoll.DamageThreshold", 14.0D); }
|
||||
|
||||
/* ARCHERY */
|
||||
@ -630,23 +630,16 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
public double getSkillShotBonusMax() { return config.getDouble("Skills.Archery.SkillShot.MaxBonus", 2.0D); }
|
||||
public double getSkillShotDamageMax() { return config.getDouble("Skills.Archery.SkillShot.MaxDamage", 9.0D); }
|
||||
|
||||
public double getDazeBonusMax() { return config.getDouble("Skills.Archery.Daze.ChanceMax", 50.0D); }
|
||||
public int getDazeMaxBonusLevel() { return config.getInt("Skills.Archery.Daze.MaxBonusLevel", 1000); }
|
||||
public double getDazeModifier() { return config.getDouble("Skills.Archery.Daze.BonusDamage", 4.0D); }
|
||||
|
||||
public double getRetrieveChanceMax() { return config.getDouble("Skills.Archery.Retrieve.ChanceMax", 100.0D); }
|
||||
public int getRetrieveMaxBonusLevel() { return config.getInt("Skills.Archery.Retrieve.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getForceMultiplier() { return config.getDouble("Skills.Archery.ForceMultiplier", 2.0D); }
|
||||
|
||||
/* AXES */
|
||||
public double getBonusDamageAxesBonusMax() { return config.getDouble("Skills.Axes.DamageIncrease.MaxBonus", 4.0D); }
|
||||
public int getBonusDamageAxesMaxBonusLevel() { return config.getInt("Skills.Axes.DamageIncrease.MaxBonusLevel", 200); }
|
||||
public double getAxeMasteryBonusMax() { return config.getDouble("Skills.Axes.AxeMastery.MaxBonus", 4.0D); }
|
||||
public int getAxeMasteryMaxBonusLevel() { return config.getInt("Skills.Axes.AxeMastery.MaxBonusLevel", 200); }
|
||||
|
||||
public double getAxesCriticalChance() { return config.getDouble("Skills.Axes.AxesCritical.ChanceMax", 37.50D); }
|
||||
public int getAxesCriticalMaxBonusLevel() { return config.getInt("Skills.Axes.AxesCritical.MaxBonusLevel", 750); }
|
||||
public double getAxesCriticalPVPModifier() { return config.getDouble("Skills.Axes.AxesCritical.PVP_Modifier", 1.5D); }
|
||||
public double getAxesCriticalPVEModifier() { return config.getDouble("Skills.Axes.AxesCritical.PVE_Modifier", 2.0D); }
|
||||
public double getCriticalHitPVPModifier() { return config.getDouble("Skills.Axes.CriticalHit.PVP_Modifier", 1.5D); }
|
||||
public double getCriticalHitPVEModifier() { return config.getDouble("Skills.Axes.CriticalHit.PVE_Modifier", 2.0D); }
|
||||
|
||||
public double getGreaterImpactChance() { return config.getDouble("Skills.Axes.GreaterImpact.Chance", 25.0D); }
|
||||
public double getGreaterImpactModifier() { return config.getDouble("Skills.Axes.GreaterImpact.KnockbackModifier", 1.5D); }
|
||||
@ -678,22 +671,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
public int getFarmerDietRankChange() { return config.getInt("Skills.Herbalism.FarmersDiet.RankChange", 200); }
|
||||
|
||||
public int getGreenThumbStageChange() { return config.getInt("Skills.Herbalism.GreenThumb.StageChange", 200); }
|
||||
public double getGreenThumbChanceMax() { return config.getDouble("Skills.Herbalism.GreenThumb.ChanceMax", 100.0D); }
|
||||
public int getGreenThumbMaxLevel() { return config.getInt("Skills.Herbalism.GreenThumb.MaxBonusLevel", 1500); }
|
||||
|
||||
public double getHerbalismDoubleDropsChanceMax() { return config.getDouble("Skills.Herbalism.DoubleDrops.ChanceMax", 100.0D); }
|
||||
public int getHerbalismDoubleDropsMaxLevel() { return config.getInt("Skills.Herbalism.DoubleDrops.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getHylianLuckChanceMax() { return config.getDouble("Skills.Herbalism.HylianLuck.ChanceMax", 10.0D); }
|
||||
public int getHylianLuckMaxLevel() { return config.getInt("Skills.Herbalism.HylianLuck.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getShroomThumbChanceMax() { return config.getDouble("Skills.Herbalism.ShroomThumb.ChanceMax", 50.0D); }
|
||||
public int getShroomThumbMaxLevel() { return config.getInt("Skills.Herbalism.ShroomThumb.MaxBonusLevel", 1500); }
|
||||
|
||||
/* MINING */
|
||||
public double getMiningDoubleDropChance() { return config.getDouble("Skills.Mining.DoubleDrops.ChanceMax", 100.0D); }
|
||||
public int getMiningDoubleDropMaxLevel() { return config.getInt("Skills.Mining.DoubleDrops.MaxBonusLevel", 1000); }
|
||||
|
||||
public int getBlastMiningRankLevel(BlastMining.Tier tier) { return config.getInt("Skills.Mining.BlastMining.Rank_Levels.Rank_" + tier.toNumerical()); }
|
||||
public double getBlastDamageDecrease(BlastMining.Tier tier) { return config.getDouble("Skills.Mining.BlastMining.BlastDamageDecrease.Rank_" + tier.toNumerical()); }
|
||||
public double getOreBonus(BlastMining.Tier tier) { return config.getDouble("Skills.Mining.BlastMining.OreBonus.Rank_" + tier.toNumerical()); }
|
||||
@ -704,8 +683,6 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
/* REPAIR */
|
||||
public double getRepairMasteryMaxBonus() { return config.getDouble("Skills.Repair.RepairMastery.MaxBonusPercentage", 200.0D); }
|
||||
public int getRepairMasteryMaxLevel() { return config.getInt("Skills.Repair.RepairMastery.MaxBonusLevel", 1000); }
|
||||
public double getSuperRepairChanceMax() { return config.getDouble("Skills.Repair.SuperRepair.ChanceMax", 100.0D); }
|
||||
public int getSuperRepairMaxLevel() { return config.getInt("Skills.Repair.SuperRepair.MaxBonusLevel", 1000); }
|
||||
public int getSalvageUnlockLevel() { return config.getInt("Skills.Repair.Salvage.UnlockLevel", 600); }
|
||||
|
||||
/* Arcane Forging */
|
||||
@ -721,9 +698,6 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
public int getBurnModifierMaxLevel() { return config.getInt("Skills.Smelting.FuelEfficiency.MaxBonusLevel", 1000); }
|
||||
public double getBurnTimeMultiplier() { return config.getDouble("Skills.Smelting.FuelEfficiency.Multiplier", 3.0D); }
|
||||
|
||||
public int getSecondSmeltMaxLevel() { return config.getInt("Skills.Smelting.SecondSmelt.MaxBonusLevel", 1000); }
|
||||
public double getSecondSmeltMaxChance() { return config.getDouble("Skills.Smelting.SecondSmelt.ChanceMax", 100.0D); }
|
||||
|
||||
public int getFluxMiningUnlockLevel() { return config.getInt("Skills.Smelting.FluxMining.UnlockLevel", 250); }
|
||||
public double getFluxMiningChance() { return config.getDouble("Skills.Smelting.FluxMining.Chance", 33.0D); }
|
||||
|
||||
@ -732,22 +706,16 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
public int getSmeltingVanillaXPBoostMultiplier(Smelting.Tier tier) { return config.getInt("Skills.Smelting.VanillaXPMultiplier.Rank_" + tier.toNumerical()); }
|
||||
|
||||
/* SWORDS */
|
||||
public double getBleedChanceMax() { return config.getDouble("Skills.Swords.Bleed.ChanceMax", 75.0D); }
|
||||
public int getBleedMaxBonusLevel() { return config.getInt("Skills.Swords.Bleed.MaxBonusLevel", 750); }
|
||||
public int getBleedMaxTicks() { return config.getInt("Skills.Swords.Bleed.MaxTicks", 3); }
|
||||
public int getBleedBaseTicks() { return config.getInt("Skills.Swords.Bleed.BaseTicks", 2); }
|
||||
|
||||
public boolean getCounterRequiresBlock() { return config.getBoolean("Skills.Swords.Counter.RequiresBlock"); }
|
||||
public double getCounterChanceMax() { return config.getDouble("Skills.Swords.Counter.ChanceMax", 30.0D); }
|
||||
public int getCounterMaxBonusLevel() { return config.getInt("Skills.Swords.Counter.MaxBonusLevel", 600); }
|
||||
public double getCounterModifier() { return config.getDouble("Skills.Swords.Counter.DamageModifier", 2.0D); }
|
||||
|
||||
public double getSerratedStrikesModifier() { return config.getDouble("Skills.Swords.SerratedStrikes.DamageModifier", 4.0D); }
|
||||
public int getSerratedStrikesTicks() { return config.getInt("Skills.Swords.SerratedStrikes.BleedTicks", 5); }
|
||||
|
||||
/* TAMING */
|
||||
public double getGoreChanceMax() { return config.getDouble("Skills.Taming.Gore.ChanceMax", 100.0D); }
|
||||
public int getGoreMaxBonusLevel() { return config.getInt("Skills.Taming.Gore.MaxBonusLevel", 1000); }
|
||||
public int getGoreBleedTicks() { return config.getInt("Skills.Taming.Gore.BleedTicks", 2); }
|
||||
public double getGoreModifier() { return config.getDouble("Skills.Taming.Gore.Modifier", 2.0D); }
|
||||
|
||||
@ -770,15 +738,6 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
public double getMaxHorseJumpStrength() { return config.getDouble("Skills.Taming.CallOfTheWild.MaxHorseJumpStrength", 2.0D); }
|
||||
|
||||
/* UNARMED */
|
||||
public double getDisarmChanceMax() { return config.getDouble("Skills.Unarmed.Disarm.ChanceMax", 33.0D); }
|
||||
public int getDisarmMaxBonusLevel() { return config.getInt("Skills.Unarmed.Disarm.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getDeflectChanceMax() { return config.getDouble("Skills.Unarmed.Deflect.ChanceMax", 50.0D); }
|
||||
public int getDeflectMaxBonusLevel() { return config.getInt("Skills.Unarmed.Deflect.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getIronGripChanceMax() { return config.getDouble("Skills.Unarmed.IronGrip.ChanceMax", 100.0D); }
|
||||
public int getIronGripMaxBonusLevel() { return config.getInt("Skills.Unarmed.IronGrip.MaxBonusLevel", 1000); }
|
||||
|
||||
public double getIronArmMinBonus() { return config.getDouble("Skills.Unarmed.IronArm.BonusMin", 3.0D); }
|
||||
public double getIronArmMaxBonus() { return config.getDouble("Skills.Unarmed.IronArm.BonusMax", 8.0D); }
|
||||
public int getIronArmIncreaseLevel() { return config.getInt("Skills.Unarmed.IronArm.IncreaseLevel", 50); }
|
||||
@ -786,9 +745,6 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
/* WOODCUTTING */
|
||||
public int getLeafBlowUnlockLevel() { return config.getInt("Skills.Woodcutting.LeafBlower.UnlockLevel", 100); }
|
||||
|
||||
public double getWoodcuttingDoubleDropChance() { return config.getDouble("Skills.Woodcutting.DoubleDrops.ChanceMax", 100.0D); }
|
||||
public int getWoodcuttingDoubleDropMaxLevel() { return config.getInt("Skills.Woodcutting.DoubleDrops.MaxBonusLevel", 1000); }
|
||||
|
||||
/* KRAKEN STUFF */
|
||||
public boolean getKrakenEnabled() { return config.getBoolean("Kraken.Enabled", true); }
|
||||
public int getKrakenTriesBeforeRelease() { return config.getInt("Kraken.Tries_Before_Release", 50); }
|
||||
|
@ -34,7 +34,7 @@ public class PlayerProfile {
|
||||
|
||||
mobHealthbarType = Config.getInstance().getMobHealthbarDefault();
|
||||
|
||||
for (AbilityType abilityType : AbilityType.NORMAL_ABILITIES) {
|
||||
for (AbilityType abilityType : AbilityType.values()) {
|
||||
abilityDATS.put(abilityType, 0);
|
||||
}
|
||||
|
||||
|
@ -1,21 +1,15 @@
|
||||
package com.gmail.nossr50.datatypes.skills;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.BlockUtils;
|
||||
import com.gmail.nossr50.util.EventUtils;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public enum AbilityType {
|
||||
BERSERK(
|
||||
"Unarmed.Skills.Berserk.On",
|
||||
@ -75,16 +69,7 @@ public enum AbilityType {
|
||||
"Mining.Blast.Other.On",
|
||||
"Mining.Blast.Refresh",
|
||||
null),
|
||||
|
||||
/**
|
||||
* No cooldown - always active
|
||||
*/
|
||||
LEAF_BLOWER,
|
||||
|
||||
/**
|
||||
* Not a first-class Ability - part of Berserk
|
||||
*/
|
||||
BLOCK_CRACKER;
|
||||
;
|
||||
|
||||
private String abilityOn;
|
||||
private String abilityOff;
|
||||
@ -92,20 +77,6 @@ public enum AbilityType {
|
||||
private String abilityRefresh;
|
||||
private String abilityPlayerOff;
|
||||
|
||||
/**
|
||||
* Those abilities that have a cooldown saved to the database.
|
||||
*/
|
||||
public static final List<AbilityType> NORMAL_ABILITIES = ImmutableList.of(BERSERK, BLAST_MINING, GIGA_DRILL_BREAKER, GREEN_TERRA, SERRATED_STRIKES, SKULL_SPLITTER, SUPER_BREAKER, TREE_FELLER);
|
||||
|
||||
/**
|
||||
* Those abilities that do not have a cooldown saved to the database.
|
||||
*/
|
||||
public static final List<AbilityType> NON_NORMAL_ABILITIES = ImmutableList.of(BLOCK_CRACKER, LEAF_BLOWER);
|
||||
|
||||
private AbilityType() {
|
||||
this(null, null, null, null, null);
|
||||
}
|
||||
|
||||
private AbilityType(String abilityOn, String abilityOff, String abilityPlayer, String abilityRefresh, String abilityPlayerOff) {
|
||||
this.abilityOn = abilityOn;
|
||||
this.abilityOff = abilityOff;
|
||||
@ -181,18 +152,12 @@ public enum AbilityType {
|
||||
case BLAST_MINING:
|
||||
return Permissions.remoteDetonation(player);
|
||||
|
||||
case BLOCK_CRACKER:
|
||||
return Permissions.blockCracker(player);
|
||||
|
||||
case GIGA_DRILL_BREAKER:
|
||||
return Permissions.gigaDrillBreaker(player);
|
||||
|
||||
case GREEN_TERRA:
|
||||
return Permissions.greenTerra(player);
|
||||
|
||||
case LEAF_BLOWER:
|
||||
return Permissions.leafBlower(player);
|
||||
|
||||
case SERRATED_STRIKES:
|
||||
return Permissions.serratedStrikes(player);
|
||||
|
||||
@ -221,18 +186,12 @@ public enum AbilityType {
|
||||
case BERSERK:
|
||||
return (BlockUtils.affectedByGigaDrillBreaker(blockState) || blockState.getType() == Material.SNOW);
|
||||
|
||||
case BLOCK_CRACKER:
|
||||
return BlockUtils.affectedByBlockCracker(blockState);
|
||||
|
||||
case GIGA_DRILL_BREAKER:
|
||||
return BlockUtils.affectedByGigaDrillBreaker(blockState);
|
||||
|
||||
case GREEN_TERRA:
|
||||
return BlockUtils.canMakeMossy(blockState);
|
||||
|
||||
case LEAF_BLOWER:
|
||||
return BlockUtils.isLeaves(blockState);
|
||||
|
||||
case SUPER_BREAKER:
|
||||
return BlockUtils.affectedBySuperBreaker(blockState);
|
||||
|
||||
@ -243,23 +202,4 @@ public enum AbilityType {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check to see if ability should be triggered.
|
||||
*
|
||||
* @param player The player using the ability
|
||||
* @param block The block modified by the ability
|
||||
* @return true if the ability should activate, false otherwise
|
||||
*/
|
||||
public boolean triggerCheck(Player player, Block block) {
|
||||
switch (this) {
|
||||
case BERSERK:
|
||||
case BLOCK_CRACKER:
|
||||
case LEAF_BLOWER:
|
||||
return blockCheck(block.getState()) && EventUtils.simulateBlockBreak(block, player, true);
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,78 @@
|
||||
package com.gmail.nossr50.datatypes.skills;
|
||||
|
||||
public enum SecondaryAbilityType {
|
||||
/* ACROBATICS */
|
||||
DODGE,
|
||||
GRACEFUL_ROLL,
|
||||
ROLL,
|
||||
|
||||
/* ARCHERY */
|
||||
DAZE,
|
||||
RETRIEVE,
|
||||
SKILL_SHOT,
|
||||
|
||||
/* Axes */
|
||||
ARMOR_IMPACT,
|
||||
AXE_MASTERY,
|
||||
CRITICAL_HIT,
|
||||
GREATER_IMPACT,
|
||||
|
||||
/* Excavation */
|
||||
EXCAVATION_TREASURE_HUNTER,
|
||||
|
||||
/* Fishing */
|
||||
FISHERMANS_DIET,
|
||||
FISHING_TREASURE_HUNTER,
|
||||
ICE_FISHING,
|
||||
MAGIC_HUNTER,
|
||||
MASTER_ANGLER,
|
||||
SHAKE,
|
||||
|
||||
/* Herbalism */
|
||||
FARMERS_DIET,
|
||||
GREEN_THUMB_PLANT,
|
||||
GREEN_THUMB_BLOCK,
|
||||
HERBALISM_DOUBLE_DROPS,
|
||||
HYLIAN_LUCK,
|
||||
SHROOM_THUMB,
|
||||
|
||||
/* Mining */
|
||||
MINING_DOUBLE_DROPS,
|
||||
|
||||
/* Repair */
|
||||
ARCANE_FORGING,
|
||||
REPAIR_MASTERY,
|
||||
SALVAGE,
|
||||
SUPER_REPAIR,
|
||||
|
||||
/* Smelting */
|
||||
FLUX_MINING,
|
||||
FUEL_EFFICIENCY,
|
||||
SECOND_SMELT,
|
||||
|
||||
/* Swords */
|
||||
BLEED,
|
||||
COUNTER,
|
||||
|
||||
/* Taming */
|
||||
BEAST_LORE,
|
||||
CALL_OF_THE_WILD,
|
||||
ENVIROMENTALLY_AWARE,
|
||||
FAST_FOOD,
|
||||
GORE,
|
||||
HOLY_HOUND,
|
||||
SHARPENED_CLAWS,
|
||||
SHOCK_PROOF,
|
||||
THICK_FUR,
|
||||
|
||||
/* Unarmed */
|
||||
BLOCK_CRACKER,
|
||||
DEFLECT,
|
||||
DISARM,
|
||||
IRON_ARM,
|
||||
IRON_GRIP,
|
||||
|
||||
/* Woodcutting */
|
||||
LEAF_BLOWER,
|
||||
WOODCUTTING_DOUBLE_DROPS;
|
||||
}
|
@ -34,24 +34,25 @@ import com.gmail.nossr50.util.skills.ParticleEffectUtils;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public enum SkillType {
|
||||
ACROBATICS(AcrobaticsManager.class, Color.WHITE),
|
||||
ARCHERY(ArcheryManager.class, Color.MAROON),
|
||||
AXES(AxesManager.class, Color.AQUA, AbilityType.SKULL_SPLITTER, ToolType.AXE),
|
||||
EXCAVATION(ExcavationManager.class, Color.fromRGB(139, 69, 19), AbilityType.GIGA_DRILL_BREAKER, ToolType.SHOVEL),
|
||||
FISHING(FishingManager.class, Color.NAVY),
|
||||
HERBALISM(HerbalismManager.class, Color.GREEN, AbilityType.GREEN_TERRA, ToolType.HOE),
|
||||
MINING(MiningManager.class, Color.GRAY, AbilityType.SUPER_BREAKER, ToolType.PICKAXE),
|
||||
REPAIR(RepairManager.class, Color.SILVER),
|
||||
SMELTING(SmeltingManager.class, Color.YELLOW),
|
||||
SWORDS(SwordsManager.class, Color.fromRGB(178, 34, 34), AbilityType.SERRATED_STRIKES, ToolType.SWORD),
|
||||
TAMING(TamingManager.class, Color.PURPLE),
|
||||
UNARMED(UnarmedManager.class, Color.BLACK, AbilityType.BERSERK, ToolType.FISTS),
|
||||
WOODCUTTING(WoodcuttingManager.class, Color.OLIVE, AbilityType.TREE_FELLER, ToolType.AXE);
|
||||
ACROBATICS(AcrobaticsManager.class, Color.WHITE, ImmutableList.of(SecondaryAbilityType.DODGE, SecondaryAbilityType.GRACEFUL_ROLL, SecondaryAbilityType.ROLL)),
|
||||
ARCHERY(ArcheryManager.class, Color.MAROON, ImmutableList.of(SecondaryAbilityType.DAZE, SecondaryAbilityType.RETRIEVE, SecondaryAbilityType.SKILL_SHOT)),
|
||||
AXES(AxesManager.class, Color.AQUA, AbilityType.SKULL_SPLITTER, ToolType.AXE, ImmutableList.of(SecondaryAbilityType.ARMOR_IMPACT, SecondaryAbilityType.AXE_MASTERY, SecondaryAbilityType.CRITICAL_HIT, SecondaryAbilityType.GREATER_IMPACT)),
|
||||
EXCAVATION(ExcavationManager.class, Color.fromRGB(139, 69, 19), AbilityType.GIGA_DRILL_BREAKER, ToolType.SHOVEL, ImmutableList.of(SecondaryAbilityType.EXCAVATION_TREASURE_HUNTER)),
|
||||
FISHING(FishingManager.class, Color.NAVY, ImmutableList.of(SecondaryAbilityType.FISHERMANS_DIET, SecondaryAbilityType.FISHING_TREASURE_HUNTER, SecondaryAbilityType.ICE_FISHING, SecondaryAbilityType.MAGIC_HUNTER, SecondaryAbilityType.MASTER_ANGLER, SecondaryAbilityType.SHAKE)),
|
||||
HERBALISM(HerbalismManager.class, Color.GREEN, AbilityType.GREEN_TERRA, ToolType.HOE, ImmutableList.of(SecondaryAbilityType.FARMERS_DIET, SecondaryAbilityType.GREEN_THUMB_PLANT, SecondaryAbilityType.GREEN_THUMB_BLOCK, SecondaryAbilityType.HERBALISM_DOUBLE_DROPS, SecondaryAbilityType.HYLIAN_LUCK, SecondaryAbilityType.SHROOM_THUMB)),
|
||||
MINING(MiningManager.class, Color.GRAY, AbilityType.SUPER_BREAKER, ToolType.PICKAXE, ImmutableList.of(SecondaryAbilityType.MINING_DOUBLE_DROPS)),
|
||||
REPAIR(RepairManager.class, Color.SILVER, ImmutableList.of(SecondaryAbilityType.ARCANE_FORGING, SecondaryAbilityType.REPAIR_MASTERY, SecondaryAbilityType.SALVAGE, SecondaryAbilityType.SUPER_REPAIR)),
|
||||
SMELTING(SmeltingManager.class, Color.YELLOW, ImmutableList.of(SecondaryAbilityType.FLUX_MINING, SecondaryAbilityType.FUEL_EFFICIENCY, SecondaryAbilityType.SECOND_SMELT)),
|
||||
SWORDS(SwordsManager.class, Color.fromRGB(178, 34, 34), AbilityType.SERRATED_STRIKES, ToolType.SWORD, ImmutableList.of(SecondaryAbilityType.BLEED, SecondaryAbilityType.COUNTER)),
|
||||
TAMING(TamingManager.class, Color.PURPLE, ImmutableList.of(SecondaryAbilityType.BEAST_LORE, SecondaryAbilityType.CALL_OF_THE_WILD, SecondaryAbilityType.ENVIROMENTALLY_AWARE, SecondaryAbilityType.FAST_FOOD, SecondaryAbilityType.GORE, SecondaryAbilityType.HOLY_HOUND, SecondaryAbilityType.SHARPENED_CLAWS, SecondaryAbilityType.SHOCK_PROOF, SecondaryAbilityType.THICK_FUR)),
|
||||
UNARMED(UnarmedManager.class, Color.BLACK, AbilityType.BERSERK, ToolType.FISTS, ImmutableList.of(SecondaryAbilityType.BLOCK_CRACKER, SecondaryAbilityType.DEFLECT, SecondaryAbilityType.DISARM, SecondaryAbilityType.IRON_ARM, SecondaryAbilityType.IRON_GRIP)),
|
||||
WOODCUTTING(WoodcuttingManager.class, Color.OLIVE, AbilityType.TREE_FELLER, ToolType.AXE, ImmutableList.of(SecondaryAbilityType.LEAF_BLOWER, SecondaryAbilityType.WOODCUTTING_DOUBLE_DROPS));
|
||||
|
||||
private Class<? extends SkillManager> managerClass;
|
||||
private Color runescapeColor;
|
||||
private AbilityType ability;
|
||||
private ToolType tool;
|
||||
private List<SecondaryAbilityType> secondaryAbilities;
|
||||
|
||||
public static final List<String> SKILL_NAMES;
|
||||
|
||||
@ -85,18 +86,16 @@ public enum SkillType {
|
||||
NON_CHILD_SKILLS = ImmutableList.copyOf(nonChildSkills);
|
||||
}
|
||||
|
||||
private SkillType(Class<? extends SkillManager> managerClass, Color runescapeColor) {
|
||||
this.managerClass = managerClass;
|
||||
this.runescapeColor = runescapeColor;
|
||||
ability = null;
|
||||
tool = null;
|
||||
private SkillType(Class<? extends SkillManager> managerClass, Color runescapeColor, List<SecondaryAbilityType> secondaryAbilities) {
|
||||
this(managerClass, runescapeColor, null, null, secondaryAbilities);
|
||||
}
|
||||
|
||||
private SkillType(Class<? extends SkillManager> managerClass, Color runescapeColor, AbilityType ability, ToolType tool) {
|
||||
private SkillType(Class<? extends SkillManager> managerClass, Color runescapeColor, AbilityType ability, ToolType tool, List<SecondaryAbilityType> secondaryAbilities) {
|
||||
this.managerClass = managerClass;
|
||||
this.runescapeColor = runescapeColor;
|
||||
this.ability = ability;
|
||||
this.tool = tool;
|
||||
this.secondaryAbilities = secondaryAbilities;
|
||||
}
|
||||
|
||||
public Class<? extends SkillManager> getManagerClass() {
|
||||
@ -148,6 +147,10 @@ public enum SkillType {
|
||||
return tool;
|
||||
}
|
||||
|
||||
public List<SecondaryAbilityType> getSkillAbilities() {
|
||||
return secondaryAbilities;
|
||||
}
|
||||
|
||||
public double getXpModifier() {
|
||||
return ExperienceConfig.getInstance().getFormulaSkillModifier(this);
|
||||
}
|
||||
@ -185,6 +188,15 @@ public enum SkillType {
|
||||
}
|
||||
}
|
||||
|
||||
public static SkillType bySecondaryAbility(SecondaryAbilityType skillAbility) {
|
||||
for (SkillType type : values()) {
|
||||
if (type.getSkillAbilities().contains(skillAbility)) {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static SkillType byAbility(AbilityType ability) {
|
||||
for (SkillType type : values()) {
|
||||
if (type.getAbility() == ability) {
|
||||
|
@ -0,0 +1,21 @@
|
||||
package com.gmail.nossr50.events.skills.secondaryabilities;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.events.skills.McMMOPlayerSkillEvent;
|
||||
|
||||
public abstract class SecondaryAbilityEvent extends McMMOPlayerSkillEvent {
|
||||
|
||||
private SecondaryAbilityType secondaryAbility;
|
||||
|
||||
public SecondaryAbilityEvent(Player player, SecondaryAbilityType secondaryAbility) {
|
||||
super(player, SkillType.bySecondaryAbility(secondaryAbility));
|
||||
this.secondaryAbility = secondaryAbility;
|
||||
}
|
||||
|
||||
public SecondaryAbilityType getSecondarySkillAbility() {
|
||||
return secondaryAbility;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.gmail.nossr50.events.skills.secondaryabilities;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
|
||||
public class SecondaryAbilityWeightedActivationCheckEvent extends SecondaryAbilityEvent {
|
||||
|
||||
private double chance;
|
||||
|
||||
public SecondaryAbilityWeightedActivationCheckEvent(Player player, SecondaryAbilityType ability, double chance) {
|
||||
super(player, ability);
|
||||
this.chance = chance;
|
||||
}
|
||||
|
||||
public double getChance() {
|
||||
return chance;
|
||||
}
|
||||
|
||||
public void setChance(double chance) {
|
||||
this.chance = Math.min(1D, chance);
|
||||
}
|
||||
|
||||
public void setSuccessful(boolean success) {
|
||||
this.chance = success ? 1.0D : 0D;
|
||||
}
|
||||
}
|
@ -36,6 +36,7 @@ import com.gmail.nossr50.skills.mining.MiningManager;
|
||||
import com.gmail.nossr50.skills.smelting.SmeltingManager;
|
||||
import com.gmail.nossr50.skills.woodcutting.WoodcuttingManager;
|
||||
import com.gmail.nossr50.util.BlockUtils;
|
||||
import com.gmail.nossr50.util.EventUtils;
|
||||
import com.gmail.nossr50.util.ItemUtils;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
@ -339,17 +340,17 @@ public class BlockListener implements Listener {
|
||||
}
|
||||
}
|
||||
else if (mcMMOPlayer.getAbilityMode(AbilityType.BERSERK) && heldItem.getType() == Material.AIR) {
|
||||
if (AbilityType.BERSERK.triggerCheck(player, block)) {
|
||||
if (AbilityType.BERSERK.blockCheck(block.getState()) && EventUtils.simulateBlockBreak(block, player, true)) {
|
||||
event.setInstaBreak(true);
|
||||
player.playSound(block.getLocation(), Sound.ITEM_PICKUP, Misc.POP_VOLUME, Misc.getPopPitch());
|
||||
}
|
||||
else if (mcMMOPlayer.getUnarmedManager().canUseBlockCracker() && AbilityType.BLOCK_CRACKER.triggerCheck(player, block)) {
|
||||
else if (mcMMOPlayer.getUnarmedManager().canUseBlockCracker() && BlockUtils.affectedByBlockCracker(blockState) && EventUtils.simulateBlockBreak(block, player, true)) {
|
||||
if (mcMMOPlayer.getUnarmedManager().blockCrackerCheck(blockState)) {
|
||||
blockState.update();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (mcMMOPlayer.getWoodcuttingManager().canUseLeafBlower(heldItem) && AbilityType.LEAF_BLOWER.triggerCheck(player, block)) {
|
||||
else if (mcMMOPlayer.getWoodcuttingManager().canUseLeafBlower(heldItem) && BlockUtils.isLeaves(blockState) && EventUtils.simulateBlockBreak(block, player, true)) {
|
||||
event.setInstaBreak(true);
|
||||
player.playSound(blockState.getLocation(), Sound.ITEM_PICKUP, Misc.POP_VOLUME, Misc.getPopPitch());
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.events.fake.FakeEntityDamageByEntityEvent;
|
||||
import com.gmail.nossr50.events.fake.FakeEntityDamageEvent;
|
||||
import com.gmail.nossr50.party.PartyManager;
|
||||
@ -515,7 +516,7 @@ public class EntityListener implements Listener {
|
||||
case GOLDEN_CARROT: /* RESTORES 3 HUNGER - RESTORES 5 1/2 HUNGER @ 1000 */
|
||||
case MUSHROOM_SOUP: /* RESTORES 4 HUNGER - RESTORES 6 1/2 HUNGER @ 1000 */
|
||||
case PUMPKIN_PIE: /* RESTORES 4 HUNGER - RESTORES 6 1/2 HUNGER @ 1000 */
|
||||
if (Permissions.farmersDiet(player)) {
|
||||
if (Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.FARMERS_DIET)) {
|
||||
event.setFoodLevel(UserManager.getPlayer(player).getHerbalismManager().farmersDiet(Herbalism.farmersDietRankLevel1, newFoodLevel));
|
||||
}
|
||||
return;
|
||||
@ -524,19 +525,19 @@ public class EntityListener implements Listener {
|
||||
case MELON: /* RESTORES 1 HUNGER - RESTORES 2 1/2 HUNGER @ 1000 */
|
||||
case POISONOUS_POTATO: /* RESTORES 1 HUNGER - RESTORES 2 1/2 HUNGER @ 1000 */
|
||||
case POTATO_ITEM: /* RESTORES 1/2 HUNGER - RESTORES 2 HUNGER @ 1000 */
|
||||
if (Permissions.farmersDiet(player)) {
|
||||
if (Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.FARMERS_DIET)) {
|
||||
event.setFoodLevel(UserManager.getPlayer(player).getHerbalismManager().farmersDiet(Herbalism.farmersDietRankLevel2, newFoodLevel));
|
||||
}
|
||||
return;
|
||||
|
||||
case COOKED_FISH: /* RESTORES 2 1/2 HUNGER - RESTORES 5 HUNGER @ 1000 */
|
||||
if (Permissions.fishermansDiet(player)) {
|
||||
if (Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.FISHERMANS_DIET)) {
|
||||
event.setFoodLevel(UserManager.getPlayer(player).getFishingManager().handleFishermanDiet(Fishing.fishermansDietRankLevel1, newFoodLevel));
|
||||
}
|
||||
return;
|
||||
|
||||
case RAW_FISH: /* RESTORES 1 HUNGER - RESTORES 2 1/2 HUNGER @ 1000 */
|
||||
if (Permissions.fishermansDiet(player)) {
|
||||
if (Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.FISHERMANS_DIET)) {
|
||||
event.setFoodLevel(UserManager.getPlayer(player).getFishingManager().handleFishermanDiet(Fishing.fishermansDietRankLevel2, newFoodLevel));
|
||||
}
|
||||
return;
|
||||
|
@ -17,6 +17,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.metadata.FixedMetadataValue;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.runnables.PlayerUpdateInventoryTask;
|
||||
import com.gmail.nossr50.util.ItemUtils;
|
||||
@ -73,7 +74,7 @@ public class InventoryListener implements Listener {
|
||||
|
||||
Player player = Misc.getPlayerFromFurnace(furnaceBlock);
|
||||
|
||||
if (Misc.isNPCEntity(player) || !Permissions.fuelEfficiency(player)) {
|
||||
if (Misc.isNPCEntity(player) || !Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.FUEL_EFFICIENCY)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,7 @@ import com.gmail.nossr50.datatypes.chat.ChatMode;
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.party.ShareHandler;
|
||||
@ -432,7 +433,7 @@ public class PlayerListener implements Listener {
|
||||
}
|
||||
}
|
||||
/* SALVAGE CHECKS */
|
||||
else if (type == Repair.salvageAnvilMaterial && Permissions.salvage(player) && Repair.isSalvageable(heldItem)) {
|
||||
else if (type == Repair.salvageAnvilMaterial && Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.SALVAGE) && Repair.isSalvageable(heldItem)) {
|
||||
RepairManager repairManager = mcMMOPlayer.getRepairManager();
|
||||
event.setCancelled(true);
|
||||
|
||||
@ -470,7 +471,7 @@ public class PlayerListener implements Listener {
|
||||
}
|
||||
}
|
||||
/* SALVAGE CHECKS */
|
||||
else if (type == Repair.salvageAnvilMaterial && Permissions.salvage(player) && Repair.isSalvageable(heldItem)) {
|
||||
else if (type == Repair.salvageAnvilMaterial && Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.SALVAGE) && Repair.isSalvageable(heldItem)) {
|
||||
RepairManager repairManager = mcMMOPlayer.getRepairManager();
|
||||
|
||||
// Cancel salvaging an enchanted item
|
||||
|
@ -29,10 +29,6 @@ public abstract class SkillManager {
|
||||
return mcMMOPlayer.getSkillLevel(skill);
|
||||
}
|
||||
|
||||
public int getActivationChance() {
|
||||
return activationChance;
|
||||
}
|
||||
|
||||
public void applyXpGain(float xp) {
|
||||
mcMMOPlayer.beginXpGain(skill, xp);
|
||||
}
|
||||
|
@ -5,17 +5,9 @@ import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||
|
||||
public final class Acrobatics {
|
||||
public static int dodgeMaxBonusLevel = AdvancedConfig.getInstance().getDodgeMaxBonusLevel();
|
||||
public static double dodgeDamageModifier = AdvancedConfig.getInstance().getDodgeDamageModifier();
|
||||
public static double dodgeMaxChance = AdvancedConfig.getInstance().getDodgeChanceMax();
|
||||
|
||||
public static int rollMaxBonusLevel = AdvancedConfig.getInstance().getRollMaxBonusLevel();
|
||||
public static double rollThreshold = AdvancedConfig.getInstance().getRollDamageThreshold();
|
||||
public static double rollMaxChance = AdvancedConfig.getInstance().getRollChanceMax();
|
||||
|
||||
public static int gracefulRollMaxBonusLevel = AdvancedConfig.getInstance().getGracefulRollMaxBonusLevel();
|
||||
public static double gracefulRollThreshold = AdvancedConfig.getInstance().getGracefulRollDamageThreshold();
|
||||
public static double gracefulRollMaxChance = AdvancedConfig.getInstance().getGracefulRollChanceMax();
|
||||
public static double dodgeDamageModifier = AdvancedConfig.getInstance().getDodgeDamageModifier();
|
||||
|
||||
public static int dodgeXpModifier = ExperienceConfig.getInstance().getDodgeXPModifier();
|
||||
public static int rollXpModifier = ExperienceConfig.getInstance().getRollXPModifier();
|
||||
|
@ -10,6 +10,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
@ -27,11 +28,11 @@ public class AcrobaticsManager extends SkillManager {
|
||||
}
|
||||
|
||||
public boolean canRoll() {
|
||||
return !exploitPrevention() && Permissions.roll(getPlayer());
|
||||
return !exploitPrevention() && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.ROLL);
|
||||
}
|
||||
|
||||
public boolean canDodge(Entity damager) {
|
||||
if (Permissions.dodge(getPlayer())) {
|
||||
if (Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.DODGE)) {
|
||||
if (damager instanceof LightningStrike && Acrobatics.dodgeLightningDisabled) {
|
||||
return false;
|
||||
}
|
||||
@ -52,7 +53,7 @@ public class AcrobaticsManager extends SkillManager {
|
||||
double modifiedDamage = Acrobatics.calculateModifiedDodgeDamage(damage, Acrobatics.dodgeDamageModifier);
|
||||
Player player = getPlayer();
|
||||
|
||||
if (!isFatal(modifiedDamage) && SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Acrobatics.dodgeMaxChance, Acrobatics.dodgeMaxBonusLevel)) {
|
||||
if (!isFatal(modifiedDamage) && SkillUtils.activationSuccessful(SecondaryAbilityType.DODGE, player, getSkillLevel(), activationChance)) {
|
||||
ParticleEffectUtils.playDodgeEffect(player);
|
||||
|
||||
if (mcMMOPlayer.useChatNotifications()) {
|
||||
@ -79,13 +80,13 @@ public class AcrobaticsManager extends SkillManager {
|
||||
public double rollCheck(double damage) {
|
||||
Player player = getPlayer();
|
||||
|
||||
if (player.isSneaking() && Permissions.gracefulRoll(player)) {
|
||||
if (player.isSneaking() && Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.GRACEFUL_ROLL)) {
|
||||
return gracefulRollCheck(damage);
|
||||
}
|
||||
|
||||
double modifiedDamage = Acrobatics.calculateModifiedRollDamage(damage, Acrobatics.rollThreshold);
|
||||
|
||||
if (!isFatal(modifiedDamage) && isSuccessfulRoll(Acrobatics.rollMaxChance, Acrobatics.rollMaxBonusLevel)) {
|
||||
if (!isFatal(modifiedDamage) && SkillUtils.activationSuccessful(SecondaryAbilityType.ROLL, player, getSkillLevel(), activationChance)) {
|
||||
player.sendMessage(LocaleLoader.getString("Acrobatics.Roll.Text"));
|
||||
applyXpGain(calculateRollXP(damage, true));
|
||||
|
||||
@ -109,7 +110,7 @@ public class AcrobaticsManager extends SkillManager {
|
||||
private double gracefulRollCheck(double damage) {
|
||||
double modifiedDamage = Acrobatics.calculateModifiedRollDamage(damage, Acrobatics.gracefulRollThreshold);
|
||||
|
||||
if (!isFatal(modifiedDamage) && isSuccessfulRoll(Acrobatics.gracefulRollMaxChance, Acrobatics.gracefulRollMaxBonusLevel)) {
|
||||
if (!isFatal(modifiedDamage) && SkillUtils.activationSuccessful(SecondaryAbilityType.GRACEFUL_ROLL, getPlayer(), getSkillLevel(), activationChance)) {
|
||||
getPlayer().sendMessage(LocaleLoader.getString("Acrobatics.Ability.Proc"));
|
||||
applyXpGain(calculateRollXP(damage, true));
|
||||
|
||||
@ -149,10 +150,6 @@ public class AcrobaticsManager extends SkillManager {
|
||||
return fallTries > Config.getInstance().getAcrobaticsAFKMaxTries();
|
||||
}
|
||||
|
||||
private boolean isSuccessfulRoll(double maxChance, int maxLevel) {
|
||||
return (maxChance / maxLevel) * Math.min(getSkillLevel(), maxLevel) > Misc.getRandom().nextInt(activationChance);
|
||||
}
|
||||
|
||||
private boolean isFatal(double damage) {
|
||||
return getPlayer().getHealth() - damage < 1;
|
||||
}
|
||||
|
@ -16,17 +16,12 @@ import com.gmail.nossr50.util.Misc;
|
||||
public class Archery {
|
||||
private static List<TrackedEntity> trackedEntities = new ArrayList<TrackedEntity>();
|
||||
|
||||
public static int retrieveMaxBonusLevel = AdvancedConfig.getInstance().getRetrieveMaxBonusLevel();
|
||||
public static double retrieveMaxChance = AdvancedConfig.getInstance().getRetrieveChanceMax();
|
||||
|
||||
public static int skillShotIncreaseLevel = AdvancedConfig.getInstance().getSkillShotIncreaseLevel();
|
||||
public static double skillShotIncreasePercentage = AdvancedConfig.getInstance().getSkillShotIncreasePercentage();
|
||||
public static double skillShotMaxBonusPercentage = AdvancedConfig.getInstance().getSkillShotBonusMax();
|
||||
public static double skillShotMaxBonusDamage = AdvancedConfig.getInstance().getSkillShotDamageMax();
|
||||
|
||||
public static int dazeMaxBonusLevel = AdvancedConfig.getInstance().getDazeMaxBonusLevel();
|
||||
public static double dazeModifier = AdvancedConfig.getInstance().getDazeModifier();
|
||||
public static double dazeMaxBonus = AdvancedConfig.getInstance().getDazeBonusMax();
|
||||
|
||||
public static final double DISTANCE_XP_MULTIPLIER = 0.025;
|
||||
|
||||
|
@ -11,6 +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.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
@ -26,15 +27,15 @@ public class ArcheryManager extends SkillManager {
|
||||
}
|
||||
|
||||
public boolean canDaze(LivingEntity target) {
|
||||
return target instanceof Player && Permissions.daze(getPlayer());
|
||||
return target instanceof Player && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.DAZE);
|
||||
}
|
||||
|
||||
public boolean canSkillShot() {
|
||||
return getSkillLevel() >= Archery.skillShotIncreaseLevel && Permissions.bonusDamage(getPlayer(), skill);
|
||||
return getSkillLevel() >= Archery.skillShotIncreaseLevel && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.SKILL_SHOT);
|
||||
}
|
||||
|
||||
public boolean canTrackArrows() {
|
||||
return Permissions.arrowRetrieval(getPlayer());
|
||||
public boolean canRetrieveArrows() {
|
||||
return Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.RETRIEVE);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -59,8 +60,8 @@ public class ArcheryManager extends SkillManager {
|
||||
*
|
||||
* @param target The {@link LivingEntity} damaged by the arrow
|
||||
*/
|
||||
public void trackArrows(LivingEntity target) {
|
||||
if (SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Archery.retrieveMaxChance, Archery.retrieveMaxBonusLevel)) {
|
||||
public void retrieveArrows(LivingEntity target) {
|
||||
if (SkillUtils.activationSuccessful(SecondaryAbilityType.RETRIEVE, getPlayer(), getSkillLevel(), activationChance)) {
|
||||
Archery.incrementTrackerValue(target);
|
||||
}
|
||||
}
|
||||
@ -72,7 +73,7 @@ public class ArcheryManager extends SkillManager {
|
||||
* @param arrow The {@link Arrow} that was fired
|
||||
*/
|
||||
public double daze(Player defender, Arrow arrow) {
|
||||
if (!SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Archery.dazeMaxBonus, Archery.dazeMaxBonusLevel)) {
|
||||
if (!SkillUtils.activationSuccessful(SecondaryAbilityType.DAZE, getPlayer(), getSkillLevel(), activationChance)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -7,13 +7,11 @@ import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.util.ItemUtils;
|
||||
|
||||
public class Axes {
|
||||
public static double bonusDamageMaxBonus = AdvancedConfig.getInstance().getBonusDamageAxesBonusMax();
|
||||
public static int bonusDamageMaxBonusLevel = AdvancedConfig.getInstance().getBonusDamageAxesMaxBonusLevel();
|
||||
public static double axeMasteryMaxBonus = AdvancedConfig.getInstance().getAxeMasteryBonusMax();
|
||||
public static int axeMasteryMaxBonusLevel = AdvancedConfig.getInstance().getAxeMasteryMaxBonusLevel();
|
||||
|
||||
public static int criticalHitMaxBonusLevel = AdvancedConfig.getInstance().getAxesCriticalMaxBonusLevel();
|
||||
public static double criticalHitMaxChance = AdvancedConfig.getInstance().getAxesCriticalChance();
|
||||
public static double criticalHitPVPModifier = AdvancedConfig.getInstance().getAxesCriticalPVPModifier();
|
||||
public static double criticalHitPVEModifier = AdvancedConfig.getInstance().getAxesCriticalPVEModifier();
|
||||
public static double criticalHitPVPModifier = AdvancedConfig.getInstance().getCriticalHitPVPModifier();
|
||||
public static double criticalHitPVEModifier = AdvancedConfig.getInstance().getCriticalHitPVEModifier();
|
||||
|
||||
public static int impactIncreaseLevel = AdvancedConfig.getInstance().getArmorImpactIncreaseLevel();
|
||||
public static double impactChance = AdvancedConfig.getInstance().getImpactChance();
|
||||
|
@ -4,10 +4,13 @@ import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.ToolType;
|
||||
import com.gmail.nossr50.events.skills.secondaryabilities.SecondaryAbilityWeightedActivationCheckEvent;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
import com.gmail.nossr50.util.ItemUtils;
|
||||
@ -24,19 +27,19 @@ public class AxesManager extends SkillManager {
|
||||
}
|
||||
|
||||
public boolean canUseAxeMastery() {
|
||||
return Permissions.bonusDamage(getPlayer(), skill);
|
||||
return Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.AXE_MASTERY);
|
||||
}
|
||||
|
||||
public boolean canCriticalHit(LivingEntity target) {
|
||||
return target.isValid() && Permissions.criticalStrikes(getPlayer());
|
||||
return target.isValid() && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.CRITICAL_HIT);
|
||||
}
|
||||
|
||||
public boolean canImpact(LivingEntity target) {
|
||||
return target.isValid() && Permissions.armorImpact(getPlayer()) && Axes.hasArmor(target);
|
||||
return target.isValid() && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.ARMOR_IMPACT) && Axes.hasArmor(target);
|
||||
}
|
||||
|
||||
public boolean canGreaterImpact(LivingEntity target) {
|
||||
return target.isValid() && Permissions.greaterImpact(getPlayer()) && !Axes.hasArmor(target);
|
||||
return target.isValid() && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.GREATER_IMPACT) && !Axes.hasArmor(target);
|
||||
}
|
||||
|
||||
public boolean canUseSkullSplitter(LivingEntity target) {
|
||||
@ -53,7 +56,7 @@ public class AxesManager extends SkillManager {
|
||||
* @param target The {@link LivingEntity} being affected by the ability
|
||||
*/
|
||||
public double axeMastery(LivingEntity target) {
|
||||
double axeBonus = Math.min(getSkillLevel() / (Axes.bonusDamageMaxBonusLevel / Axes.bonusDamageMaxBonus), Axes.bonusDamageMaxBonus);
|
||||
double axeBonus = Math.min(getSkillLevel() / (Axes.axeMasteryMaxBonusLevel / Axes.axeMasteryMaxBonus), Axes.axeMasteryMaxBonus);
|
||||
|
||||
return CombatUtils.callFakeDamageEvent(getPlayer(), target, axeBonus);
|
||||
}
|
||||
@ -65,7 +68,7 @@ public class AxesManager extends SkillManager {
|
||||
* @param damage The amount of damage initially dealt by the event
|
||||
*/
|
||||
public double criticalHit(LivingEntity target, double damage) {
|
||||
if (!SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Axes.criticalHitMaxChance, Axes.criticalHitMaxBonusLevel)) {
|
||||
if (!SkillUtils.activationSuccessful(SecondaryAbilityType.CRITICAL_HIT, getPlayer(), getSkillLevel(), activationChance)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -94,11 +97,16 @@ public class AxesManager extends SkillManager {
|
||||
int durabilityDamage = 1 + (getSkillLevel() / Axes.impactIncreaseLevel);
|
||||
|
||||
for (ItemStack armor : target.getEquipment().getArmorContents()) {
|
||||
if (ItemUtils.isArmor(armor) && Axes.impactChance > Misc.getRandom().nextInt(getActivationChance())) {
|
||||
if (ItemUtils.isArmor(armor)) {
|
||||
double chance = Axes.impactChance / activationChance;
|
||||
SecondaryAbilityWeightedActivationCheckEvent event = new SecondaryAbilityWeightedActivationCheckEvent(getPlayer(), SecondaryAbilityType.ARMOR_IMPACT, chance);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
||||
if ((event.getChance() * activationChance) > Misc.getRandom().nextInt(activationChance)) {
|
||||
SkillUtils.handleDurabilityChange(armor, durabilityDamage, Axes.impactMaxDurabilityModifier);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the effects of the Greater Impact ability
|
||||
@ -106,7 +114,10 @@ public class AxesManager extends SkillManager {
|
||||
* @param target The {@link LivingEntity} being affected by the ability
|
||||
*/
|
||||
public double greaterImpact(LivingEntity target) {
|
||||
if (!(Axes.greaterImpactChance > Misc.getRandom().nextInt(getActivationChance()))) {
|
||||
double chance = Axes.greaterImpactChance / activationChance;
|
||||
SecondaryAbilityWeightedActivationCheckEvent event = new SecondaryAbilityWeightedActivationCheckEvent(getPlayer(), SecondaryAbilityType.GREATER_IMPACT, chance);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
||||
if ((event.getChance() * activationChance) <= Misc.getRandom().nextInt(activationChance)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.block.BlockState;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.treasure.ExcavationTreasure;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
@ -27,7 +28,7 @@ public class ExcavationManager extends SkillManager {
|
||||
public void excavationBlockCheck(BlockState blockState) {
|
||||
int xp = Excavation.getBlockXP(blockState);
|
||||
|
||||
if (Permissions.excavationTreasureHunter(getPlayer())) {
|
||||
if (Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.EXCAVATION_TREASURE_HUNTER)) {
|
||||
List<ExcavationTreasure> treasures = Excavation.getTreasures(blockState);
|
||||
|
||||
if (!treasures.isEmpty()) {
|
||||
@ -35,7 +36,7 @@ public class ExcavationManager extends SkillManager {
|
||||
Location location = blockState.getLocation();
|
||||
|
||||
for (ExcavationTreasure treasure : treasures) {
|
||||
if (skillLevel >= treasure.getDropLevel() && SkillUtils.treasureDropSuccessful(treasure.getDropChance(), activationChance)) {
|
||||
if (skillLevel >= treasure.getDropLevel() && SkillUtils.treasureDropSuccessful(getPlayer(), treasure.getDropChance(), activationChance)) {
|
||||
xp += treasure.getXp();
|
||||
Misc.dropItem(location, treasure.getDrop());
|
||||
}
|
||||
|
@ -41,6 +41,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.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.treasure.EnchantmentTreasure;
|
||||
import com.gmail.nossr50.datatypes.treasure.FishingTreasure;
|
||||
@ -48,6 +49,7 @@ import com.gmail.nossr50.datatypes.treasure.Rarity;
|
||||
import com.gmail.nossr50.datatypes.treasure.ShakeTreasure;
|
||||
import com.gmail.nossr50.events.skills.fishing.McMMOPlayerFishingTreasureEvent;
|
||||
import com.gmail.nossr50.events.skills.fishing.McMMOPlayerShakeEvent;
|
||||
import com.gmail.nossr50.events.skills.secondaryabilities.SecondaryAbilityWeightedActivationCheckEvent;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.runnables.skills.KrakenAttackTask;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
@ -74,11 +76,11 @@ public class FishingManager extends SkillManager {
|
||||
}
|
||||
|
||||
public boolean canShake(Entity target) {
|
||||
return target instanceof LivingEntity && getSkillLevel() >= Tier.ONE.getLevel() && Permissions.shake(getPlayer());
|
||||
return target instanceof LivingEntity && getSkillLevel() >= Tier.ONE.getLevel() && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.SHAKE);
|
||||
}
|
||||
|
||||
public boolean canMasterAngler() {
|
||||
return getSkillLevel() >= AdvancedConfig.getInstance().getMasterAnglerUnlockLevel() && Permissions.masterAngler(getPlayer());
|
||||
return getSkillLevel() >= AdvancedConfig.getInstance().getMasterAnglerUnlockLevel() && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.MASTER_ANGLER);
|
||||
}
|
||||
|
||||
public boolean unleashTheKraken() {
|
||||
@ -205,7 +207,7 @@ public class FishingManager extends SkillManager {
|
||||
|
||||
Player player = getPlayer();
|
||||
|
||||
if (!Permissions.iceFishing(player)) {
|
||||
if (!Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.ICE_FISHING)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -306,7 +308,7 @@ public class FishingManager extends SkillManager {
|
||||
Player player = getPlayer();
|
||||
FishingTreasure treasure = null;
|
||||
|
||||
if (Config.getInstance().getFishingDropsEnabled() && Permissions.fishingTreasureHunter(player)) {
|
||||
if (Config.getInstance().getFishingDropsEnabled() && Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.FISHING_TREASURE_HUNTER)) {
|
||||
treasure = getFishingTreasure();
|
||||
this.fishingCatch = null;
|
||||
}
|
||||
@ -317,7 +319,7 @@ public class FishingManager extends SkillManager {
|
||||
ItemStack treasureDrop = treasure.getDrop().clone(); // Not cloning is bad, m'kay?
|
||||
Map<Enchantment, Integer> enchants = new HashMap<Enchantment, Integer>();
|
||||
|
||||
if (Permissions.magicHunter(player) && ItemUtils.isEnchantable(treasureDrop)) {
|
||||
if (Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.MAGIC_HUNTER) && ItemUtils.isEnchantable(treasureDrop)) {
|
||||
enchants = handleMagicHunter(treasureDrop);
|
||||
}
|
||||
|
||||
@ -375,7 +377,9 @@ public class FishingManager extends SkillManager {
|
||||
public void shakeCheck(LivingEntity target) {
|
||||
fishingTries--; // Because autoclicking to shake is OK.
|
||||
|
||||
if (getShakeProbability() > Misc.getRandom().nextInt(getActivationChance())) {
|
||||
SecondaryAbilityWeightedActivationCheckEvent activationEvent = new SecondaryAbilityWeightedActivationCheckEvent(getPlayer(), SecondaryAbilityType.SHAKE, getShakeProbability() / activationChance);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(activationEvent);
|
||||
if ((activationEvent.getChance() * activationChance) > Misc.getRandom().nextInt(activationChance)) {
|
||||
List<ShakeTreasure> possibleDrops = Fishing.findPossibleDrops(target);
|
||||
|
||||
if (possibleDrops == null || possibleDrops.isEmpty()) {
|
||||
@ -425,11 +429,11 @@ public class FishingManager extends SkillManager {
|
||||
break;
|
||||
}
|
||||
|
||||
McMMOPlayerShakeEvent event = new McMMOPlayerShakeEvent(getPlayer(), drop);
|
||||
McMMOPlayerShakeEvent shakeEvent = new McMMOPlayerShakeEvent(getPlayer(), drop);
|
||||
|
||||
drop = event.getDrop();
|
||||
drop = shakeEvent.getDrop();
|
||||
|
||||
if (event.isCancelled() || drop == null) {
|
||||
if (shakeEvent.isCancelled() || drop == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -17,18 +17,6 @@ public class Herbalism {
|
||||
public static int greenThumbStageChangeLevel = AdvancedConfig.getInstance().getGreenThumbStageChange();
|
||||
public static int greenThumbStageMaxLevel = greenThumbStageChangeLevel * 4;
|
||||
|
||||
public static int greenThumbMaxLevel = AdvancedConfig.getInstance().getGreenThumbMaxLevel();
|
||||
public static double greenThumbMaxChance = AdvancedConfig.getInstance().getGreenThumbChanceMax();
|
||||
|
||||
public static int doubleDropsMaxLevel = AdvancedConfig.getInstance().getHerbalismDoubleDropsMaxLevel();
|
||||
public static double doubleDropsMaxChance = AdvancedConfig.getInstance().getHerbalismDoubleDropsChanceMax();
|
||||
|
||||
public static int hylianLuckMaxLevel = AdvancedConfig.getInstance().getHylianLuckMaxLevel();
|
||||
public static double hylianLuckMaxChance = AdvancedConfig.getInstance().getHylianLuckChanceMax();
|
||||
|
||||
public static int shroomThumbMaxLevel = AdvancedConfig.getInstance().getShroomThumbMaxLevel();
|
||||
public static double shroomThumbMaxChance = AdvancedConfig.getInstance().getShroomThumbChanceMax();
|
||||
|
||||
/**
|
||||
* Convert blocks affected by the Green Thumb & Green Terra abilities.
|
||||
*
|
||||
|
@ -23,6 +23,7 @@ import com.gmail.nossr50.config.treasure.TreasureConfig;
|
||||
import com.gmail.nossr50.datatypes.mods.CustomBlock;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.ToolType;
|
||||
import com.gmail.nossr50.datatypes.treasure.HylianTreasure;
|
||||
@ -56,11 +57,11 @@ public class HerbalismManager extends SkillManager {
|
||||
Player player = getPlayer();
|
||||
Material itemType = player.getItemInHand().getType();
|
||||
|
||||
return (itemType == Material.RED_MUSHROOM || itemType == Material.BROWN_MUSHROOM) && BlockUtils.canMakeShroomy(blockState) && Permissions.shroomThumb(player);
|
||||
return (itemType == Material.RED_MUSHROOM || itemType == Material.BROWN_MUSHROOM) && BlockUtils.canMakeShroomy(blockState) && Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.SHROOM_THUMB);
|
||||
}
|
||||
|
||||
public boolean canUseHylianLuck() {
|
||||
return Permissions.hylianLuck(getPlayer());
|
||||
return Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.HYLIAN_LUCK);
|
||||
}
|
||||
|
||||
public boolean canGreenTerraBlock(BlockState blockState) {
|
||||
@ -140,7 +141,7 @@ public class HerbalismManager extends SkillManager {
|
||||
CustomBlock customBlock = ModUtils.getCustomBlock(blockState);
|
||||
xp = customBlock.getXpGain();
|
||||
|
||||
if (Permissions.doubleDrops(player, skill) && customBlock.isDoubleDropEnabled()) {
|
||||
if (Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.HERBALISM_DOUBLE_DROPS) && customBlock.isDoubleDropEnabled()) {
|
||||
drops = blockState.getBlock().getDrops();
|
||||
}
|
||||
}
|
||||
@ -151,7 +152,7 @@ public class HerbalismManager extends SkillManager {
|
||||
|
||||
xp = ExperienceConfig.getInstance().getXp(skill, material);
|
||||
|
||||
if (Config.getInstance().getDoubleDropsEnabled(skill, material) && Permissions.doubleDrops(player, skill)) {
|
||||
if (Config.getInstance().getDoubleDropsEnabled(skill, material) && Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.HERBALISM_DOUBLE_DROPS)) {
|
||||
drops = blockState.getBlock().getDrops();
|
||||
}
|
||||
|
||||
@ -168,7 +169,7 @@ public class HerbalismManager extends SkillManager {
|
||||
}
|
||||
|
||||
for (int i = greenTerra ? 2 : 1; i != 0; i--) {
|
||||
if (SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Herbalism.doubleDropsMaxChance, Herbalism.doubleDropsMaxLevel)) {
|
||||
if (SkillUtils.activationSuccessful(SecondaryAbilityType.HERBALISM_DOUBLE_DROPS, getPlayer(), getSkillLevel(), activationChance)) {
|
||||
for (ItemStack item : drops) {
|
||||
Misc.dropItems(blockState.getLocation(), item, amount);
|
||||
}
|
||||
@ -183,7 +184,7 @@ public class HerbalismManager extends SkillManager {
|
||||
* @return true if the ability was successful, false otherwise
|
||||
*/
|
||||
public boolean processGreenThumbBlocks(BlockState blockState) {
|
||||
if (!SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Herbalism.greenThumbMaxChance, Herbalism.greenThumbMaxLevel)) {
|
||||
if (!SkillUtils.activationSuccessful(SecondaryAbilityType.GREEN_THUMB_BLOCK, getPlayer(), getSkillLevel(), activationChance)) {
|
||||
getPlayer().sendMessage(LocaleLoader.getString("Herbalism.Ability.GTh.Fail"));
|
||||
return false;
|
||||
}
|
||||
@ -198,7 +199,7 @@ public class HerbalismManager extends SkillManager {
|
||||
* @return true if the ability was successful, false otherwise
|
||||
*/
|
||||
public boolean processHylianLuck(BlockState blockState) {
|
||||
if (!SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Herbalism.hylianLuckMaxChance, Herbalism.hylianLuckMaxLevel)) {
|
||||
if (!SkillUtils.activationSuccessful(SecondaryAbilityType.HYLIAN_LUCK, getPlayer(), getSkillLevel(), activationChance)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -266,7 +267,7 @@ public class HerbalismManager extends SkillManager {
|
||||
playerInventory.removeItem(new ItemStack(Material.RED_MUSHROOM));
|
||||
player.updateInventory();
|
||||
|
||||
if (!SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Herbalism.shroomThumbMaxChance, Herbalism.shroomThumbMaxLevel)) {
|
||||
if (!SkillUtils.activationSuccessful(SecondaryAbilityType.SHROOM_THUMB, getPlayer(), getSkillLevel(), activationChance)) {
|
||||
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.ShroomThumb.Fail"));
|
||||
return false;
|
||||
}
|
||||
@ -310,7 +311,7 @@ public class HerbalismManager extends SkillManager {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!greenTerra && !SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Herbalism.greenThumbMaxChance, Herbalism.greenThumbMaxLevel)) {
|
||||
if (!greenTerra && !SkillUtils.activationSuccessful(SecondaryAbilityType.GREEN_THUMB_PLANT, getPlayer(), getSkillLevel(), activationChance)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,6 @@ import org.bukkit.Material;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
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.SkillType;
|
||||
@ -12,8 +11,6 @@ import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.ModUtils;
|
||||
|
||||
public class Mining {
|
||||
public static int doubleDropsMaxLevel = AdvancedConfig.getInstance().getMiningDoubleDropMaxLevel();
|
||||
public static double doubleDropsMaxChance = AdvancedConfig.getInstance().getMiningDoubleDropChance();
|
||||
|
||||
/**
|
||||
* Calculate XP gain for Mining.
|
||||
|
@ -15,6 +15,7 @@ import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.runnables.skills.AbilityCooldownTask;
|
||||
@ -60,7 +61,7 @@ public class MiningManager extends SkillManager {
|
||||
|
||||
applyXpGain(Mining.getBlockXp(blockState));
|
||||
|
||||
if (!Permissions.doubleDrops(player, skill)) {
|
||||
if (!Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.MINING_DOUBLE_DROPS)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -77,7 +78,7 @@ public class MiningManager extends SkillManager {
|
||||
boolean silkTouch = player.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH);
|
||||
|
||||
for (int i = mcMMOPlayer.getAbilityMode(skill.getAbility()) ? 2 : 1; i != 0; i--) {
|
||||
if (SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Mining.doubleDropsMaxChance, Mining.doubleDropsMaxLevel)) {
|
||||
if (SkillUtils.activationSuccessful(SecondaryAbilityType.MINING_DOUBLE_DROPS, getPlayer(), getSkillLevel(), activationChance)) {
|
||||
if (silkTouch) {
|
||||
Mining.handleSilkTouchDrops(blockState);
|
||||
}
|
||||
|
@ -19,9 +19,6 @@ public class Repair {
|
||||
public static int repairMasteryMaxBonusLevel = AdvancedConfig.getInstance().getRepairMasteryMaxLevel();
|
||||
public static double repairMasteryMaxBonus = AdvancedConfig.getInstance().getRepairMasteryMaxBonus();
|
||||
|
||||
public static int superRepairMaxBonusLevel = AdvancedConfig.getInstance().getSuperRepairMaxLevel();
|
||||
public static double superRepairMaxChance = AdvancedConfig.getInstance().getSuperRepairChanceMax();
|
||||
|
||||
public static int salvageUnlockLevel = AdvancedConfig.getInstance().getSalvageUnlockLevel();
|
||||
|
||||
public static Material salvageAnvilMaterial = Config.getInstance().getSalvageAnvilMaterial();
|
||||
|
@ -16,6 +16,7 @@ import com.gmail.nossr50.mcMMO;
|
||||
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.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
@ -273,12 +274,12 @@ public class RepairManager extends SkillManager {
|
||||
private short repairCalculate(short durability, int repairAmount) {
|
||||
Player player = getPlayer();
|
||||
|
||||
if (Permissions.repairMastery(player)) {
|
||||
if (Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.REPAIR_MASTERY)) {
|
||||
double bonus = repairAmount * Math.min((((Repair.repairMasteryMaxBonus / Repair.repairMasteryMaxBonusLevel) * getSkillLevel()) / 100.0D), Repair.repairMasteryMaxBonus / 100.0D);
|
||||
repairAmount += bonus;
|
||||
}
|
||||
|
||||
if (Permissions.superRepair(player) && checkPlayerProcRepair()) {
|
||||
if (Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.SUPER_REPAIR) && checkPlayerProcRepair()) {
|
||||
repairAmount *= 2.0D;
|
||||
}
|
||||
|
||||
@ -295,7 +296,7 @@ public class RepairManager extends SkillManager {
|
||||
* @return true if bonus granted, false otherwise
|
||||
*/
|
||||
private boolean checkPlayerProcRepair() {
|
||||
if (SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Repair.superRepairMaxChance, Repair.superRepairMaxBonusLevel)) {
|
||||
if (SkillUtils.activationSuccessful(SecondaryAbilityType.SUPER_REPAIR, getPlayer(), getSkillLevel(), activationChance)) {
|
||||
getPlayer().sendMessage(LocaleLoader.getString("Repair.Skills.FeltEasy"));
|
||||
return true;
|
||||
}
|
||||
@ -322,7 +323,7 @@ public class RepairManager extends SkillManager {
|
||||
return;
|
||||
}
|
||||
|
||||
if (getArcaneForgingRank() == 0 || !Permissions.arcaneForging(player)) {
|
||||
if (getArcaneForgingRank() == 0 || !Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.ARCANE_FORGING)) {
|
||||
for (Enchantment enchant : enchants.keySet()) {
|
||||
item.removeEnchantment(enchant);
|
||||
}
|
||||
|
@ -43,9 +43,6 @@ public class Smelting {
|
||||
public static int burnModifierMaxLevel = AdvancedConfig.getInstance().getBurnModifierMaxLevel();
|
||||
public static double burnTimeMultiplier = AdvancedConfig.getInstance().getBurnTimeMultiplier();
|
||||
|
||||
public static int secondSmeltMaxLevel = AdvancedConfig.getInstance().getSecondSmeltMaxLevel();
|
||||
public static double secondSmeltMaxChance = AdvancedConfig.getInstance().getSecondSmeltMaxChance();
|
||||
|
||||
public static int fluxMiningUnlockLevel = AdvancedConfig.getInstance().getFluxMiningUnlockLevel();
|
||||
public static double fluxMiningChance = AdvancedConfig.getInstance().getFluxMiningChance();
|
||||
|
||||
|
@ -8,10 +8,11 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.events.skills.secondaryabilities.SecondaryAbilityWeightedActivationCheckEvent;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
import com.gmail.nossr50.skills.mining.Mining;
|
||||
import com.gmail.nossr50.skills.smelting.Smelting.Tier;
|
||||
import com.gmail.nossr50.util.BlockUtils;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
@ -24,11 +25,11 @@ public class SmeltingManager extends SkillManager {
|
||||
}
|
||||
|
||||
public boolean canUseFluxMining(BlockState blockState) {
|
||||
return getSkillLevel() >= Smelting.fluxMiningUnlockLevel && BlockUtils.affectedByFluxMining(blockState) && Permissions.fluxMining(getPlayer()) && !mcMMO.getPlaceStore().isTrue(blockState);
|
||||
return getSkillLevel() >= Smelting.fluxMiningUnlockLevel && BlockUtils.affectedByFluxMining(blockState) && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.FLUX_MINING) && !mcMMO.getPlaceStore().isTrue(blockState);
|
||||
}
|
||||
|
||||
public boolean isDoubleDropSuccessful() {
|
||||
return Permissions.doubleDrops(getPlayer(), skill) && SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Mining.doubleDropsMaxChance, Mining.doubleDropsMaxLevel);
|
||||
public boolean isSecondSmeltSuccessful() {
|
||||
return Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.SECOND_SMELT) && SkillUtils.activationSuccessful(SecondaryAbilityType.SECOND_SMELT, getPlayer(), getSkillLevel(), activationChance);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -40,7 +41,9 @@ public class SmeltingManager extends SkillManager {
|
||||
public boolean processFluxMining(BlockState blockState) {
|
||||
Player player = getPlayer();
|
||||
|
||||
if (Smelting.fluxMiningChance > Misc.getRandom().nextInt(getActivationChance())) {
|
||||
SecondaryAbilityWeightedActivationCheckEvent event = new SecondaryAbilityWeightedActivationCheckEvent(getPlayer(), SecondaryAbilityType.FLUX_MINING, Smelting.fluxMiningChance / activationChance);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
||||
if ((event.getChance() * activationChance) > Misc.getRandom().nextInt(activationChance)) {
|
||||
ItemStack item = null;
|
||||
|
||||
switch (blockState.getType()) {
|
||||
@ -60,7 +63,7 @@ public class SmeltingManager extends SkillManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
Misc.dropItems(blockState.getLocation(), item, isDoubleDropSuccessful() ? 2 : 1);
|
||||
Misc.dropItems(blockState.getLocation(), item, isSecondSmeltSuccessful() ? 2 : 1);
|
||||
|
||||
blockState.setType(Material.AIR);
|
||||
player.sendMessage(LocaleLoader.getString("Smelting.FluxMining.Success"));
|
||||
@ -82,11 +85,9 @@ public class SmeltingManager extends SkillManager {
|
||||
}
|
||||
|
||||
public ItemStack smeltProcessing(ItemStack smelting, ItemStack result) {
|
||||
Player player = getPlayer();
|
||||
|
||||
applyXpGain(Smelting.getResourceXp(smelting));
|
||||
|
||||
if (Permissions.doubleDrops(player, skill) && SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Smelting.secondSmeltMaxChance, Smelting.secondSmeltMaxLevel)) {
|
||||
if (isSecondSmeltSuccessful()) {
|
||||
ItemStack newResult = result.clone();
|
||||
|
||||
newResult.setAmount(result.getAmount() + 1);
|
||||
|
@ -3,15 +3,11 @@ package com.gmail.nossr50.skills.swords;
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
|
||||
public class Swords {
|
||||
public static int bleedMaxBonusLevel = AdvancedConfig.getInstance().getBleedMaxBonusLevel();
|
||||
public static int bleedMaxTicks = AdvancedConfig.getInstance().getBleedMaxTicks();
|
||||
public static int bleedBaseTicks = AdvancedConfig.getInstance().getBleedBaseTicks();
|
||||
public static double bleedMaxChance = AdvancedConfig.getInstance().getBleedChanceMax();
|
||||
|
||||
public static boolean counterAttackRequiresBlock = AdvancedConfig.getInstance().getCounterRequiresBlock();
|
||||
public static int counterAttackMaxBonusLevel = AdvancedConfig.getInstance().getCounterMaxBonusLevel();
|
||||
public static double counterAttackModifier = AdvancedConfig.getInstance().getCounterModifier();
|
||||
public static double counterAttackMaxChance = AdvancedConfig.getInstance().getCounterChanceMax();
|
||||
|
||||
public static double serratedStrikesModifier = AdvancedConfig.getInstance().getSerratedStrikesModifier();
|
||||
public static int serratedStrikesBleedTicks = AdvancedConfig.getInstance().getSerratedStrikesTicks();
|
||||
|
@ -4,8 +4,10 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.ToolType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
@ -26,11 +28,11 @@ public class SwordsManager extends SkillManager {
|
||||
}
|
||||
|
||||
public boolean canUseBleed() {
|
||||
return Permissions.bleed(getPlayer());
|
||||
return Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.BLEED);
|
||||
}
|
||||
|
||||
public boolean canUseCounterAttack(Entity target) {
|
||||
return target instanceof LivingEntity && Permissions.counterAttack(getPlayer());
|
||||
return target instanceof LivingEntity && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.COUNTER);
|
||||
}
|
||||
|
||||
public boolean canUseSerratedStrike() {
|
||||
@ -43,9 +45,9 @@ public class SwordsManager extends SkillManager {
|
||||
* @param target The defending entity
|
||||
*/
|
||||
public void bleedCheck(LivingEntity target) {
|
||||
if (SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Swords.bleedMaxChance, Swords.bleedMaxBonusLevel)) {
|
||||
if (SkillUtils.activationSuccessful(SecondaryAbilityType.BLEED, getPlayer(), getSkillLevel(), activationChance)) {
|
||||
|
||||
if (getSkillLevel() >= Swords.bleedMaxBonusLevel) {
|
||||
if (getSkillLevel() >= AdvancedConfig.getInstance().getMaxBonusLevel(SecondaryAbilityType.BLEED)) {
|
||||
BleedTimerTask.add(target, Swords.bleedMaxTicks);
|
||||
}
|
||||
else {
|
||||
@ -77,7 +79,7 @@ public class SwordsManager extends SkillManager {
|
||||
return;
|
||||
}
|
||||
|
||||
if (SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Swords.counterAttackMaxChance, Swords.counterAttackMaxBonusLevel)) {
|
||||
if (SkillUtils.activationSuccessful(SecondaryAbilityType.COUNTER, getPlayer(), getSkillLevel(), activationChance)) {
|
||||
CombatUtils.dealDamage(attacker, damage / Swords.counterAttackModifier);
|
||||
|
||||
getPlayer().sendMessage(LocaleLoader.getString("Swords.Combat.Countered"));
|
||||
|
@ -19,9 +19,7 @@ public class Taming {
|
||||
public static double fastFoodServiceActivationChance = AdvancedConfig.getInstance().getFastFoodChance();
|
||||
|
||||
public static int goreBleedTicks = AdvancedConfig.getInstance().getGoreBleedTicks();
|
||||
public static int goreMaxBonusLevel = AdvancedConfig.getInstance().getGoreMaxBonusLevel();
|
||||
public static double goreModifier = AdvancedConfig.getInstance().getGoreModifier();
|
||||
public static double goreMaxChance = AdvancedConfig.getInstance().getGoreChanceMax();
|
||||
|
||||
public static int sharpenedClawsUnlockLevel = AdvancedConfig.getInstance().getSharpenedClawsUnlock();
|
||||
public static double sharpenedClawsBonusDamage = AdvancedConfig.getInstance().getSharpenedClawsBonus();
|
||||
|
@ -14,7 +14,9 @@ import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.events.skills.secondaryabilities.SecondaryAbilityWeightedActivationCheckEvent;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.runnables.skills.BleedTimerTask;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
@ -30,35 +32,35 @@ public class TamingManager extends SkillManager {
|
||||
}
|
||||
|
||||
public boolean canUseThickFur() {
|
||||
return getSkillLevel() >= Taming.thickFurUnlockLevel && Permissions.thickFur(getPlayer());
|
||||
return getSkillLevel() >= Taming.thickFurUnlockLevel && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.THICK_FUR);
|
||||
}
|
||||
|
||||
public boolean canUseEnvironmentallyAware() {
|
||||
return getSkillLevel() >= Taming.environmentallyAwareUnlockLevel && Permissions.environmentallyAware(getPlayer());
|
||||
return getSkillLevel() >= Taming.environmentallyAwareUnlockLevel && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.ENVIROMENTALLY_AWARE);
|
||||
}
|
||||
|
||||
public boolean canUseShockProof() {
|
||||
return getSkillLevel() >= Taming.shockProofUnlockLevel && Permissions.shockProof(getPlayer());
|
||||
return getSkillLevel() >= Taming.shockProofUnlockLevel && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.SHOCK_PROOF);
|
||||
}
|
||||
|
||||
public boolean canUseHolyHound() {
|
||||
return getSkillLevel() >= Taming.holyHoundUnlockLevel && Permissions.holyHound(getPlayer());
|
||||
return getSkillLevel() >= Taming.holyHoundUnlockLevel && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.HOLY_HOUND);
|
||||
}
|
||||
|
||||
public boolean canUseFastFoodService() {
|
||||
return getSkillLevel() >= Taming.fastFoodServiceUnlockLevel && Permissions.fastFoodService(getPlayer());
|
||||
return getSkillLevel() >= Taming.fastFoodServiceUnlockLevel && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.FAST_FOOD);
|
||||
}
|
||||
|
||||
public boolean canUseSharpenedClaws() {
|
||||
return getSkillLevel() >= Taming.sharpenedClawsUnlockLevel && Permissions.sharpenedClaws(getPlayer());
|
||||
return getSkillLevel() >= Taming.sharpenedClawsUnlockLevel && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.SHARPENED_CLAWS);
|
||||
}
|
||||
|
||||
public boolean canUseGore() {
|
||||
return Permissions.gore(getPlayer());
|
||||
return Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.GORE);
|
||||
}
|
||||
|
||||
public boolean canUseBeastLore() {
|
||||
return Permissions.beastLore(getPlayer());
|
||||
return Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.BEAST_LORE);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -92,7 +94,10 @@ public class TamingManager extends SkillManager {
|
||||
* @param damage The damage being absorbed by the wolf
|
||||
*/
|
||||
public void fastFoodService(Wolf wolf, double damage) {
|
||||
if (Taming.fastFoodServiceActivationChance > Misc.getRandom().nextInt(getActivationChance())) {
|
||||
double chance = Taming.fastFoodServiceActivationChance / activationChance;
|
||||
SecondaryAbilityWeightedActivationCheckEvent event = new SecondaryAbilityWeightedActivationCheckEvent(getPlayer(), SecondaryAbilityType.FAST_FOOD, chance);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
||||
if ((event.getChance() * activationChance) > Misc.getRandom().nextInt(activationChance)) {
|
||||
|
||||
double health = wolf.getHealth();
|
||||
double maxHealth = wolf.getMaxHealth();
|
||||
@ -112,7 +117,7 @@ public class TamingManager extends SkillManager {
|
||||
* @param wolf The wolf using the ability
|
||||
*/
|
||||
public double gore(LivingEntity target, double damage, Wolf wolf) {
|
||||
if (!SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Taming.goreMaxChance, Taming.goreMaxBonusLevel)) {
|
||||
if (!SkillUtils.activationSuccessful(SecondaryAbilityType.GORE, getPlayer(), getSkillLevel(), activationChance)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -14,15 +14,6 @@ public class Unarmed {
|
||||
public static double ironArmMaxBonusDamage = AdvancedConfig.getInstance().getIronArmMaxBonus();
|
||||
public static int ironArmIncreaseLevel = AdvancedConfig.getInstance().getIronArmIncreaseLevel();
|
||||
|
||||
public static int disarmMaxBonusLevel = AdvancedConfig.getInstance().getDisarmMaxBonusLevel();
|
||||
public static double disarmMaxChance = AdvancedConfig.getInstance().getDisarmChanceMax();
|
||||
|
||||
public static int deflectMaxBonusLevel = AdvancedConfig.getInstance().getDeflectMaxBonusLevel();
|
||||
public static double deflectMaxChance = AdvancedConfig.getInstance().getDeflectChanceMax();
|
||||
|
||||
public static int ironGripMaxBonusLevel = AdvancedConfig.getInstance().getIronGripMaxBonusLevel();
|
||||
public static double ironGripMaxChance = AdvancedConfig.getInstance().getIronGripChanceMax();
|
||||
|
||||
public static boolean blockCrackerSmoothBrick = Config.getInstance().getUnarmedBlockCrackerSmoothbrickToCracked();
|
||||
|
||||
public static double berserkDamageModifier = 1.5;
|
||||
|
@ -10,6 +10,7 @@ import org.bukkit.material.SmoothBrick;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.ToolType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
@ -30,7 +31,7 @@ public class UnarmedManager extends SkillManager {
|
||||
}
|
||||
|
||||
public boolean canUseIronArm() {
|
||||
return Permissions.bonusDamage(getPlayer(), skill);
|
||||
return Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.IRON_ARM);
|
||||
}
|
||||
|
||||
public boolean canUseBerserk() {
|
||||
@ -38,17 +39,17 @@ public class UnarmedManager extends SkillManager {
|
||||
}
|
||||
|
||||
public boolean canDisarm(LivingEntity target) {
|
||||
return target instanceof Player && ((Player) target).getItemInHand().getType() != Material.AIR && Permissions.disarm(getPlayer());
|
||||
return target instanceof Player && ((Player) target).getItemInHand().getType() != Material.AIR && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.DISARM);
|
||||
}
|
||||
|
||||
public boolean canDeflect() {
|
||||
Player player = getPlayer();
|
||||
|
||||
return player.getItemInHand().getType() == Material.AIR && Permissions.arrowDeflect(player);
|
||||
return player.getItemInHand().getType() == Material.AIR && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.DEFLECT);
|
||||
}
|
||||
|
||||
public boolean canUseBlockCracker() {
|
||||
return Permissions.blockCracker(getPlayer());
|
||||
return Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.BLOCK_CRACKER);
|
||||
}
|
||||
|
||||
public boolean blockCrackerCheck(BlockState blockState) {
|
||||
@ -81,7 +82,7 @@ public class UnarmedManager extends SkillManager {
|
||||
* @param defender The defending player
|
||||
*/
|
||||
public void disarmCheck(Player defender) {
|
||||
if (SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Unarmed.disarmMaxChance, Unarmed.disarmMaxBonusLevel) && !hasIronGrip(defender)) {
|
||||
if (SkillUtils.activationSuccessful(SecondaryAbilityType.DISARM, getPlayer(), getSkillLevel(), activationChance) && !hasIronGrip(defender)) {
|
||||
if (EventUtils.callDisarmEvent(defender).isCancelled()) {
|
||||
return;
|
||||
}
|
||||
@ -97,7 +98,7 @@ public class UnarmedManager extends SkillManager {
|
||||
* Check for arrow deflection.
|
||||
*/
|
||||
public boolean deflectCheck() {
|
||||
if (SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Unarmed.deflectMaxChance, Unarmed.deflectMaxBonusLevel)) {
|
||||
if (SkillUtils.activationSuccessful(SecondaryAbilityType.DEFLECT, getPlayer(), getSkillLevel(), activationChance)) {
|
||||
getPlayer().sendMessage(LocaleLoader.getString("Combat.ArrowDeflect"));
|
||||
return true;
|
||||
}
|
||||
@ -135,7 +136,7 @@ public class UnarmedManager extends SkillManager {
|
||||
* @return true if the defender was not disarmed, false otherwise
|
||||
*/
|
||||
private boolean hasIronGrip(Player defender) {
|
||||
if (!Misc.isNPCEntity(defender) && Permissions.ironGrip(defender) && SkillUtils.activationSuccessful(defender, skill, Unarmed.ironGripMaxChance, Unarmed.ironGripMaxBonusLevel)) {
|
||||
if (!Misc.isNPCEntity(defender) && Permissions.secondaryAbilityEnabled(defender, SecondaryAbilityType.IRON_GRIP) && SkillUtils.activationSuccessful(SecondaryAbilityType.IRON_GRIP, defender, skill)) {
|
||||
defender.sendMessage(LocaleLoader.getString("Unarmed.Ability.IronGrip.Defender"));
|
||||
getPlayer().sendMessage(LocaleLoader.getString("Unarmed.Ability.IronGrip.Attacker"));
|
||||
|
||||
|
@ -20,9 +20,6 @@ import com.gmail.nossr50.util.ModUtils;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
|
||||
public final class Woodcutting {
|
||||
public static int doubleDropsMaxLevel = AdvancedConfig.getInstance().getWoodcuttingDoubleDropMaxLevel();
|
||||
public static double doubleDropsMaxChance = AdvancedConfig.getInstance().getWoodcuttingDoubleDropChance();
|
||||
|
||||
public static int leafBlowerUnlockLevel = AdvancedConfig.getInstance().getLeafBlowUnlockLevel();
|
||||
public static int treeFellerThreshold = Config.getInstance().getTreeFellerThreshold();
|
||||
|
||||
|
@ -14,6 +14,7 @@ import org.bukkit.material.Tree;
|
||||
import com.gmail.nossr50.datatypes.mods.CustomBlock;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
@ -32,7 +33,7 @@ public class WoodcuttingManager extends SkillManager {
|
||||
}
|
||||
|
||||
public boolean canUseLeafBlower(ItemStack heldItem) {
|
||||
return getSkillLevel() >= Woodcutting.leafBlowerUnlockLevel && ItemUtils.isAxe(heldItem);
|
||||
return Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.LEAF_BLOWER) && getSkillLevel() >= Woodcutting.leafBlowerUnlockLevel && ItemUtils.isAxe(heldItem);
|
||||
}
|
||||
|
||||
public boolean canUseTreeFeller(ItemStack heldItem) {
|
||||
@ -40,7 +41,7 @@ public class WoodcuttingManager extends SkillManager {
|
||||
}
|
||||
|
||||
protected boolean canGetDoubleDrops() {
|
||||
return Permissions.doubleDrops(getPlayer(), skill) && SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Woodcutting.doubleDropsMaxChance, Woodcutting.doubleDropsMaxLevel);
|
||||
return Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.WOODCUTTING_DOUBLE_DROPS) && SkillUtils.activationSuccessful(SecondaryAbilityType.WOODCUTTING_DOUBLE_DROPS, getPlayer(), getSkillLevel(), activationChance);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -11,6 +11,7 @@ import org.bukkit.plugin.PluginManager;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.commands.party.PartySubcommandType;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
|
||||
public final class Permissions {
|
||||
@ -123,44 +124,19 @@ public final class Permissions {
|
||||
*/
|
||||
|
||||
public static boolean skillEnabled(Permissible permissible, SkillType skill) {return permissible.hasPermission("mcmmo.skills." + skill.toString().toLowerCase()); }
|
||||
public static boolean doubleDrops(Permissible permissible, SkillType skill) { return permissible.hasPermission("mcmmo.ability." + skill.toString().toLowerCase() + ".doubledrops"); }
|
||||
public static boolean vanillaXpBoost(Permissible permissible, SkillType skill) { return permissible.hasPermission("mcmmo.ability." + skill.toString().toLowerCase() + ".vanillaxpboost"); }
|
||||
public static boolean bonusDamage(Permissible permissible, SkillType skill) { return permissible.hasPermission("mcmmo.ability." + skill.toString().toLowerCase() + ".bonusdamage"); }
|
||||
|
||||
/* ACROBATICS */
|
||||
public static boolean dodge(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.acrobatics.dodge"); }
|
||||
public static boolean gracefulRoll(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.acrobatics.gracefulroll"); }
|
||||
public static boolean roll(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.acrobatics.roll"); }
|
||||
|
||||
/* ARCHERY */
|
||||
public static boolean arrowRetrieval(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.archery.trackarrows"); }
|
||||
public static boolean daze(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.archery.daze"); }
|
||||
public static boolean secondaryAbilityEnabled(Permissible permissible, SecondaryAbilityType skillAbility) { return permissible.hasPermission("mcmmo.ability." + SkillType.bySecondaryAbility(skillAbility).toString().toLowerCase() + "." + StringUtils.getPrettySecondaryAbilityString(skillAbility).replace("_", "").toLowerCase()); }
|
||||
|
||||
/* AXES */
|
||||
public static boolean armorImpact(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.axes.impact"); }
|
||||
public static boolean criticalStrikes(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.axes.criticalhit"); }
|
||||
public static boolean greaterImpact(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.axes.greaterimpact"); }
|
||||
public static boolean skullSplitter(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.axes.skullsplitter"); }
|
||||
|
||||
/* EXCAVATION */
|
||||
public static boolean gigaDrillBreaker(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.excavation.gigadrillbreaker"); }
|
||||
public static boolean excavationTreasureHunter(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.excavation.treasures"); }
|
||||
|
||||
/* FISHING */
|
||||
public static boolean fishermansDiet(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.fishing.fishermansdiet"); }
|
||||
public static boolean fishingTreasureHunter(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.fishing.treasures"); }
|
||||
public static boolean iceFishing(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.fishing.icefishing"); }
|
||||
public static boolean magicHunter(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.fishing.magic"); }
|
||||
public static boolean masterAngler(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.fishing.masterangler"); }
|
||||
public static boolean shake(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.fishing.shakemob"); }
|
||||
|
||||
/* HERBALISM */
|
||||
public static boolean farmersDiet(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.herbalism.farmersdiet"); }
|
||||
public static boolean greenTerra(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.herbalism.greenterra"); }
|
||||
public static boolean greenThumbBlock(Permissible permissible, Material material) { return permissible.hasPermission("mcmmo.ability.herbalism.greenthumb.blocks." + material.toString().replace("_", "").toLowerCase()); }
|
||||
public static boolean greenThumbPlant(Permissible permissible, Material material) { return permissible.hasPermission("mcmmo.ability.herbalism.greenthumb.plants." + material.toString().replace("_", "").toLowerCase()); }
|
||||
public static boolean hylianLuck(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.herbalism.hylianluck"); }
|
||||
public static boolean shroomThumb(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.herbalism.shroomthumb"); }
|
||||
|
||||
/* MINING */
|
||||
public static boolean biggerBombs(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.mining.blastmining.biggerbombs"); }
|
||||
@ -169,11 +145,6 @@ public final class Permissions {
|
||||
public static boolean superBreaker(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.mining.superbreaker"); }
|
||||
|
||||
/* REPAIR */
|
||||
public static boolean arcaneForging(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.repair.arcaneforging"); }
|
||||
public static boolean repairMastery(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.repair.repairmastery"); }
|
||||
public static boolean salvage(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.repair.salvage"); }
|
||||
public static boolean superRepair(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.repair.repairbonus"); }
|
||||
|
||||
public static boolean repairArmor(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.repair.armorrepair"); }
|
||||
public static boolean repairTools(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.repair.toolrepair"); }
|
||||
public static boolean repairOtherItems(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.repair.otherrepair"); }
|
||||
@ -187,36 +158,16 @@ public final class Permissions {
|
||||
public static boolean repairStone(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.repair.stonerepair"); }
|
||||
public static boolean repairWood(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.repair.woodrepair"); }
|
||||
|
||||
/* SMELTING */
|
||||
public static boolean fluxMining(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.smelting.fluxmining"); }
|
||||
public static boolean fuelEfficiency(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.smelting.fuelefficiency"); }
|
||||
|
||||
/* SWORDS */
|
||||
public static boolean bleed(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.swords.bleed"); }
|
||||
public static boolean counterAttack(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.swords.counterattack"); }
|
||||
public static boolean serratedStrikes(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.swords.serratedstrikes"); }
|
||||
|
||||
/* TAMING */
|
||||
public static boolean beastLore(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.taming.beastlore"); }
|
||||
public static boolean callOfTheWild(Permissible permissible, EntityType type) { return permissible.hasPermission("mcmmo.ability.taming.callofthewild." + type.toString().toLowerCase()); }
|
||||
public static boolean renamePets(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.taming.callofthewild.renamepets"); }
|
||||
public static boolean environmentallyAware(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.taming.environmentallyaware"); }
|
||||
public static boolean fastFoodService(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.taming.fastfoodservice"); }
|
||||
public static boolean gore(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.taming.gore"); }
|
||||
public static boolean holyHound(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.taming.holyhound"); }
|
||||
public static boolean thickFur(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.taming.thickfur"); }
|
||||
public static boolean sharpenedClaws(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.taming.sharpenedclaws"); }
|
||||
public static boolean shockProof(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.taming.shockproof"); }
|
||||
|
||||
/* UNARMED */
|
||||
public static boolean arrowDeflect(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.unarmed.deflect"); }
|
||||
public static boolean berserk(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.unarmed.berserk"); }
|
||||
public static boolean blockCracker(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.unarmed.blockcracker"); }
|
||||
public static boolean disarm(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.unarmed.disarm"); }
|
||||
public static boolean ironGrip(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.unarmed.irongrip"); }
|
||||
|
||||
/* WOODCUTTING */
|
||||
public static boolean leafBlower(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.woodcutting.leafblower"); }
|
||||
public static boolean treeFeller(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.woodcutting.treefeller"); }
|
||||
|
||||
/*
|
||||
|
@ -4,6 +4,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
|
||||
public class StringUtils {
|
||||
/**
|
||||
@ -28,6 +29,23 @@ public class StringUtils {
|
||||
return createPrettyEnumString(ability.toString());
|
||||
}
|
||||
|
||||
public static String getPrettySecondaryAbilityString(SecondaryAbilityType secondaryAbility) {
|
||||
switch(secondaryAbility) {
|
||||
case HERBALISM_DOUBLE_DROPS:
|
||||
case MINING_DOUBLE_DROPS:
|
||||
case WOODCUTTING_DOUBLE_DROPS:
|
||||
return "DoubleDrops";
|
||||
case FISHING_TREASURE_HUNTER:
|
||||
case EXCAVATION_TREASURE_HUNTER:
|
||||
return "TreasureHunter";
|
||||
case GREEN_THUMB_BLOCK:
|
||||
case GREEN_THUMB_PLANT:
|
||||
return "GreenThumb";
|
||||
default:
|
||||
return createPrettyEnumString(secondaryAbility.toString());
|
||||
}
|
||||
}
|
||||
|
||||
private static String createPrettyEnumString(String baseString) {
|
||||
String[] substrings = baseString.split("_");
|
||||
String prettyString = "";
|
||||
|
@ -106,7 +106,7 @@ public class ScoreboardManager {
|
||||
}
|
||||
}
|
||||
|
||||
for (AbilityType type : AbilityType.NORMAL_ABILITIES) {
|
||||
for (AbilityType type : AbilityType.values()) {
|
||||
abilityLabelSkillBuilder.put(type, getOfflinePlayerDots((type == AbilityType.BLAST_MINING ? ChatColor.BLUE : ChatColor.AQUA) + type.getName()));
|
||||
}
|
||||
|
||||
|
@ -456,7 +456,7 @@ public class ScoreboardWrapper {
|
||||
case COOLDOWNS_BOARD:
|
||||
boolean anyCooldownsActive = false;
|
||||
|
||||
for (AbilityType ability : AbilityType.NORMAL_ABILITIES) {
|
||||
for (AbilityType ability : AbilityType.values()) {
|
||||
int seconds = Math.max(mcMMOPlayer.calculateTimeRemaining(ability), 0);
|
||||
|
||||
if (seconds != 0) {
|
||||
|
@ -176,8 +176,8 @@ public final class CombatUtils {
|
||||
finalDamage += archeryManager.daze((Player) target, arrow);
|
||||
}
|
||||
|
||||
if (!arrow.hasMetadata(mcMMO.infiniteArrowKey) && archeryManager.canTrackArrows()) {
|
||||
archeryManager.trackArrows(target);
|
||||
if (!arrow.hasMetadata(mcMMO.infiniteArrowKey) && archeryManager.canRetrieveArrows()) {
|
||||
archeryManager.retrieveArrows(target);
|
||||
}
|
||||
|
||||
archeryManager.distanceXpBonus(target, arrow);
|
||||
|
@ -18,7 +18,9 @@ import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.HiddenConfig;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.events.skills.secondaryabilities.SecondaryAbilityWeightedActivationCheckEvent;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.ItemUtils;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
@ -187,16 +189,25 @@ public class SkillUtils {
|
||||
itemStack.setDurability((short) Math.min(itemStack.getDurability() + durabilityModifier, maxDurability));
|
||||
}
|
||||
|
||||
public static boolean activationSuccessful(Player player, SkillType skill, double maxChance, int maxLevel) {
|
||||
return activationSuccessful(UserManager.getPlayer(player).getSkillLevel(skill), PerksUtils.handleLuckyPerks(player, skill), maxChance, maxLevel);
|
||||
public static boolean activationSuccessful(SecondaryAbilityType skillAbility, Player player, SkillType skill) {
|
||||
return activationSuccessful(skillAbility, player, UserManager.getPlayer(player).getSkillLevel(skill), PerksUtils.handleLuckyPerks(player, skill));
|
||||
}
|
||||
|
||||
public static boolean activationSuccessful(int skillLevel, int activationChance, double maxChance, int maxLevel) {
|
||||
return (maxChance / maxLevel) * Math.min(skillLevel, maxLevel) > Misc.getRandom().nextInt(activationChance);
|
||||
public static boolean activationSuccessful(SecondaryAbilityType skillAbility, Player player, int skillLevel, int activationChance) {
|
||||
return activationSuccessful(skillAbility, player, skillLevel, activationChance, AdvancedConfig.getInstance().getMaxChance(skillAbility), AdvancedConfig.getInstance().getMaxBonusLevel(skillAbility));
|
||||
}
|
||||
|
||||
public static boolean treasureDropSuccessful(double dropChance, int activationChance) {
|
||||
return dropChance > Misc.getRandom().nextDouble() * activationChance;
|
||||
public static boolean activationSuccessful(SecondaryAbilityType skillAbility, Player player, int skillLevel, int activationChance, double maxChance, int maxLevel) {
|
||||
double chance = (maxChance / maxLevel) * Math.min(skillLevel, maxLevel) / activationChance;
|
||||
SecondaryAbilityWeightedActivationCheckEvent event = new SecondaryAbilityWeightedActivationCheckEvent(player, skillAbility, chance);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
||||
return (event.getChance() * activationChance) > Misc.getRandom().nextInt(activationChance);
|
||||
}
|
||||
|
||||
public static boolean treasureDropSuccessful(Player player, double dropChance, int activationChance) {;
|
||||
SecondaryAbilityWeightedActivationCheckEvent event = new SecondaryAbilityWeightedActivationCheckEvent(player, SecondaryAbilityType.EXCAVATION_TREASURE_HUNTER, dropChance / activationChance);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
||||
return (event.getChance() * activationChance) > (Misc.getRandom().nextDouble() * activationChance);
|
||||
}
|
||||
|
||||
private static boolean isLocalizedSkill(String skillName) {
|
||||
|
@ -80,19 +80,17 @@ Skills:
|
||||
# Settings for Axes
|
||||
###
|
||||
Axes:
|
||||
DamageIncrease:
|
||||
AxeMastery:
|
||||
# MaxBonus: Maximum bonus damage when on <MaxBonusLevel> or higher
|
||||
# MaxBonusLevel: Level where <MaxBonus> is reached
|
||||
MaxBonus: 4.0
|
||||
MaxBonusLevel: 200
|
||||
|
||||
AxesCritical:
|
||||
CriticalHit:
|
||||
# ChanceMax: Maximum chance of causing a critical hit when on <MaxBonusLevel> or higher
|
||||
# MaxBonusLevel: Level where <ChanceMax> of causing critical hits is reached
|
||||
ChanceMax: 37.50
|
||||
MaxBonusLevel: 750
|
||||
|
||||
AxesCritical:
|
||||
# Damage modifier of critical hits for PVP / PVE, when causing a critical hit the damage gets multiplied by the modifier
|
||||
PVP_Modifier: 1.5
|
||||
PVE_Modifier: 2.0
|
||||
|
@ -175,14 +175,14 @@ permissions:
|
||||
mcmmo.ability.archery.all:
|
||||
description: Allows access to all Archery abilities
|
||||
children:
|
||||
mcmmo.ability.archery.bonusdamage: true
|
||||
mcmmo.ability.archery.skillshot: true
|
||||
mcmmo.ability.archery.daze: true
|
||||
mcmmo.ability.archery.trackarrows: true
|
||||
mcmmo.ability.archery.bonusdamage:
|
||||
description: Allows bonus damage from Archery
|
||||
mcmmo.ability.archery.retrieve: true
|
||||
mcmmo.ability.archery.skillshot:
|
||||
description: Allows bonus damage from the Archery SkillShot ability
|
||||
mcmmo.ability.archery.daze:
|
||||
description: Allows access to the Daze ability
|
||||
mcmmo.ability.archery.trackarrows:
|
||||
mcmmo.ability.archery.retrieve:
|
||||
description: Allows tracking & retrieval of arrows
|
||||
mcmmo.ability.axes.*:
|
||||
default: false
|
||||
@ -192,48 +192,21 @@ permissions:
|
||||
mcmmo.ability.axes.all:
|
||||
description: Allows access to all Axes abilities
|
||||
children:
|
||||
mcmmo.ability.axes.bonusdamage: true
|
||||
mcmmo.ability.axes.axemastery: true
|
||||
mcmmo.ability.axes.criticalhit: true
|
||||
mcmmo.ability.axes.greaterimpact: true
|
||||
mcmmo.ability.axes.impact: true
|
||||
mcmmo.ability.axes.armorimpact: true
|
||||
mcmmo.ability.axes.skullsplitter: true
|
||||
mcmmo.ability.axes.bonusdamage:
|
||||
mcmmo.ability.axes.axemastery:
|
||||
description: Allows bonus damage from Axes
|
||||
mcmmo.ability.axes.criticalhit:
|
||||
description: Allows access to the Critical Hit ability
|
||||
mcmmo.ability.axes.greaterimpact:
|
||||
description: Allows access to the Greater Impact ability
|
||||
mcmmo.ability.axes.impact:
|
||||
mcmmo.ability.axes.armorimpact:
|
||||
description: Allows access to the Impact ability
|
||||
mcmmo.ability.axes.skullsplitter:
|
||||
description: Allows access to the Skull Splitter ability
|
||||
mcmmo.ability.blastmining.*:
|
||||
default: false
|
||||
description: Allows access to all Blast Mining abilities
|
||||
children:
|
||||
mcmmo.ability.blastmining.all: true
|
||||
mcmmo.ability.blastmining.all:
|
||||
default: false
|
||||
description: Allows access to all Blast Mining abilities
|
||||
children:
|
||||
mcmmo.ability.blastmining.biggerbombs: true
|
||||
mcmmo.ability.blastmining.demolitionsexpertise: true
|
||||
mcmmo.ability.blastmining.detonate: true
|
||||
mcmmo.ability.blastmining.biggerbombs:
|
||||
default: false
|
||||
description: Allows access to the Bigger Bombs ability
|
||||
children:
|
||||
mcmmo.ability.mining.blastmining.biggerbombs: true
|
||||
mcmmo.ability.blastmining.demolitionsexpertise:
|
||||
default: false
|
||||
description: Allows access to the Demolitions Expertise ability
|
||||
children:
|
||||
mcmmo.ability.mining.blastmining.demolitionsexpertise: true
|
||||
mcmmo.ability.blastmining.detonate:
|
||||
default: false
|
||||
description: Allows for remote TNT detonation
|
||||
children:
|
||||
mcmmo.ability.mining.blastmining.detonate: true
|
||||
mcmmo.ability.excavation.*:
|
||||
default: false
|
||||
description: Allows access to all Excavation abilities
|
||||
@ -243,10 +216,10 @@ permissions:
|
||||
description: Allows access to all Excavation abilities
|
||||
children:
|
||||
mcmmo.ability.excavation.gigadrillbreaker: true
|
||||
mcmmo.ability.excavation.treasures: true
|
||||
mcmmo.ability.excavation.treasurehunter: true
|
||||
mcmmo.ability.excavation.gigadrillbreaker:
|
||||
description: Allows access to the Giga Drill Breaker ability
|
||||
mcmmo.ability.excavation.treasures:
|
||||
mcmmo.ability.excavation.treasurehunter:
|
||||
description: Allows treasure drops from Excavation
|
||||
mcmmo.ability.fishing.*:
|
||||
default: false
|
||||
@ -258,22 +231,22 @@ permissions:
|
||||
children:
|
||||
mcmmo.ability.fishing.fishermansdiet: true
|
||||
mcmmo.ability.fishing.icefishing: true
|
||||
mcmmo.ability.fishing.magic: true
|
||||
mcmmo.ability.fishing.magichunter: true
|
||||
mcmmo.ability.fishing.masterangler: true
|
||||
mcmmo.ability.fishing.shakemob: true
|
||||
mcmmo.ability.fishing.treasures: true
|
||||
mcmmo.ability.fishing.shake: true
|
||||
mcmmo.ability.fishing.treasurehunter: true
|
||||
mcmmo.ability.fishing.vanillaxpboost: true
|
||||
mcmmo.ability.fishing.fishermansdiet:
|
||||
description: Allows access to the Fishermans's Diet ability
|
||||
mcmmo.ability.fishing.icefishing:
|
||||
description: Allows access to the Ice Fishing ability
|
||||
mcmmo.ability.fishing.magic:
|
||||
mcmmo.ability.fishing.magichunter:
|
||||
description: Allows enchanted drops from Fishing
|
||||
mcmmo.ability.fishing.masterangler:
|
||||
description: Allows access to the Master Angler ability
|
||||
mcmmo.ability.fishing.shakemob:
|
||||
mcmmo.ability.fishing.shake:
|
||||
description: Allows access to the Shake Mob ability
|
||||
mcmmo.ability.fishing.treasures:
|
||||
mcmmo.ability.fishing.treasurehunter:
|
||||
description: Allows treasure drops from Fishing
|
||||
mcmmo.ability.fishing.vanillaxpboost:
|
||||
description: Allows vanilla XP boost from Fishing
|
||||
@ -350,36 +323,6 @@ permissions:
|
||||
description: Allows access to the Green Thumb ability for netherwart
|
||||
mcmmo.ability.herbalism.greenthumb.plants.potato:
|
||||
description: Allows access to the Green Thumb ability for potatoes
|
||||
mcmmo.ability.herbalism.greenthumbblocks:
|
||||
default: false
|
||||
description: Allows access to all Green Thumb abilities for blocks
|
||||
children:
|
||||
mcmmo.ability.herbalism.greenthumb.blocks.all: true
|
||||
mcmmo.ability.herbalism.greenthumbcarrots:
|
||||
default: false
|
||||
description: Allows access to the Green Thumb ability for carrots
|
||||
children:
|
||||
mcmmo.ability.herbalism.greenthumb.plants.carrot: true
|
||||
mcmmo.ability.herbalism.greenthumbcocoa:
|
||||
default: false
|
||||
description: Allows access to the Green Thumb ability for cocoa
|
||||
children:
|
||||
mcmmo.ability.herbalism.greenthumb.plants.cocoa: true
|
||||
mcmmo.ability.herbalism.greenthumbnetherwart:
|
||||
default: false
|
||||
description: Allows access to the Green Thumb ability for netherwart
|
||||
children:
|
||||
mcmmo.ability.herbalism.greenthumb.plants.netherwarts: true
|
||||
mcmmo.ability.herbalism.greenthumbpotatoes:
|
||||
default: false
|
||||
description: Allows access to the Green Thumb ability for potatoes
|
||||
children:
|
||||
mcmmo.ability.herbalism.greenthumb.plants.potato: true
|
||||
mcmmo.ability.herbalism.greenthumbwheat:
|
||||
default: false
|
||||
description: Allows access to the Green Thumb ability for wheat
|
||||
children:
|
||||
mcmmo.ability.herbalism.greenthumb.plants.crops: true
|
||||
mcmmo.ability.herbalism.hylianluck:
|
||||
description: Allows access to the Hylian Luck ability
|
||||
mcmmo.ability.herbalism.shroomthumb:
|
||||
@ -455,7 +398,7 @@ permissions:
|
||||
description: Allows ability to repair items of material type OTHER
|
||||
mcmmo.ability.repair.otherrepair:
|
||||
description: Allows ability to repair items of type OTHER
|
||||
mcmmo.ability.repair.repairbonus:
|
||||
mcmmo.ability.repair.superrepair:
|
||||
description: Allows access to Super Repair bonus
|
||||
mcmmo.ability.repair.repairmastery:
|
||||
description: Allows access to Repair Mastery
|
||||
@ -477,21 +420,16 @@ permissions:
|
||||
mcmmo.ability.smelting.all:
|
||||
description: Allows access to all Smelting abilities
|
||||
children:
|
||||
mcmmo.ability.smelting.doubledrops: true
|
||||
mcmmo.ability.smelting.secondsmelt: true
|
||||
mcmmo.ability.smelting.fluxmining: true
|
||||
mcmmo.ability.smelting.fuelefficiency: true
|
||||
mcmmo.ability.smelting.vanillaxpboost: true
|
||||
mcmmo.ability.smelting.doubledrops:
|
||||
description: Allows access to the Second Smelt ability
|
||||
mcmmo.ability.smelting.fluxmining:
|
||||
description: Allows access to the Flux Mining ability
|
||||
mcmmo.ability.smelting.fuelefficiency:
|
||||
description: Allows access to the Fuel Efficiency ability
|
||||
mcmmo.ability.smelting.secondsmelt:
|
||||
default: false
|
||||
description: Allows access to the Second Smelt ability
|
||||
children:
|
||||
mcmmo.ability.smelting.doubledrops: true
|
||||
mcmmo.ability.smelting.vanillaxpboost:
|
||||
description: Allows vanilla XP boost from Smelting
|
||||
mcmmo.ability.swords.*:
|
||||
@ -503,11 +441,11 @@ permissions:
|
||||
description: Allows access to all Swords abilities
|
||||
children:
|
||||
mcmmo.ability.swords.bleed: true
|
||||
mcmmo.ability.swords.counterattack: true
|
||||
mcmmo.ability.swords.counter: true
|
||||
mcmmo.ability.swords.serratedstrikes: true
|
||||
mcmmo.ability.swords.bleed:
|
||||
description: Allows access to the Bleed ability
|
||||
mcmmo.ability.swords.counterattack:
|
||||
mcmmo.ability.swords.counter:
|
||||
description: Allows access to the Counter Attack ability
|
||||
mcmmo.ability.swords.serratedstrikes:
|
||||
description: Allows access to the Serrated Strikes ability
|
||||
@ -522,7 +460,7 @@ permissions:
|
||||
mcmmo.ability.taming.beastlore: true
|
||||
mcmmo.ability.taming.callofthewild.all: true
|
||||
mcmmo.ability.taming.environmentallyaware: true
|
||||
mcmmo.ability.taming.fastfoodservice: true
|
||||
mcmmo.ability.taming.fastfood: true
|
||||
mcmmo.ability.taming.gore: true
|
||||
mcmmo.ability.taming.holyhound: true
|
||||
mcmmo.ability.taming.sharpenedclaws: true
|
||||
@ -555,14 +493,9 @@ permissions:
|
||||
description: Allows players to rename pets with Call of the Wild
|
||||
mcmmo.ability.taming.callofthewild.wolf:
|
||||
description: Allows players to summon Wolves with Call of the Wild
|
||||
mcmmo.ability.taming.callofthewild_renamepets:
|
||||
default: false
|
||||
description: Pets spawned with Call of the Wild will have custom names
|
||||
children:
|
||||
mcmmo.ability.taming.callofthewild.renamepets: true
|
||||
mcmmo.ability.taming.environmentallyaware:
|
||||
description: Allows access to the Environmentally Aware ability
|
||||
mcmmo.ability.taming.fastfoodservice:
|
||||
mcmmo.ability.taming.fastfood:
|
||||
description: Allows access to the Fast Food Service ability
|
||||
mcmmo.ability.taming.gore:
|
||||
description: Allows access to the Gore ability
|
||||
@ -584,7 +517,7 @@ permissions:
|
||||
children:
|
||||
mcmmo.ability.unarmed.berserk: true
|
||||
mcmmo.ability.unarmed.blockcracker: true
|
||||
mcmmo.ability.unarmed.bonusdamage: true
|
||||
mcmmo.ability.unarmed.ironarm: true
|
||||
mcmmo.ability.unarmed.deflect: true
|
||||
mcmmo.ability.unarmed.disarm: true
|
||||
mcmmo.ability.unarmed.irongrip: true
|
||||
@ -592,8 +525,8 @@ permissions:
|
||||
description: Allows access to the Berserker ability
|
||||
mcmmo.ability.unarmed.blockcracker:
|
||||
description: Allows access to the Block Cracker ability
|
||||
mcmmo.ability.unarmed.bonusdamage:
|
||||
description: Allows bonus damage from Unarmed
|
||||
mcmmo.ability.unarmed.ironarm:
|
||||
description: Allows bonus damage from the Iron Arm ability
|
||||
mcmmo.ability.unarmed.deflect:
|
||||
description: Allows access to the Deflect ability
|
||||
mcmmo.ability.unarmed.disarm:
|
||||
@ -1843,3 +1776,128 @@ permissions:
|
||||
mcmmo.tools.updatecheck:
|
||||
default: false
|
||||
description: Notifies admins if there is a new version of mcMMO available
|
||||
mcmmo.ability.fishing.shakemob:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.fishing.shake: true
|
||||
mcmmo.ability.axes.impact:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.axes.armorimpact: true
|
||||
mcmmo.ability.taming.fastfoodservice:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.taming.fastfood: true
|
||||
mcmmo.ability.archery.trackarrows:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.archery.retrieve: true
|
||||
mcmmo.ability.repair.repairbonus:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.repair.superrepair: true
|
||||
mcmmo.ability.swords.counterattack:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.swords.counter: true
|
||||
mcmmo.ability.archery.bonusdamage:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.archery.skillshot: true
|
||||
mcmmo.ability.excavation.treasures:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.excavation.treasurehunter: true
|
||||
mcmmo.ability.fishing.treasures:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.fishing.treasurehunter: true
|
||||
mcmmo.ability.fishing.magic:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.fishing.magichunter: true
|
||||
mcmmo.ability.unarmed.bonusdamage:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.unarmed.ironarm: true
|
||||
mcmmo.ability.axes.bonusdamage:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.axes.axemastery: true
|
||||
mcmmo.ability.smelting.doubledrops:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.smelting.secondsmelt: true
|
||||
mcmmo.ability.taming.callofthewild_renamepets:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.taming.callofthewild.renamepets: true
|
||||
mcmmo.ability.blastmining.*:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.mining.blastmining.*: true
|
||||
mcmmo.ability.blastmining.all:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.mining.blastmining.all: true
|
||||
mcmmo.ability.blastmining.biggerbombs:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.mining.blastmining.biggerbombs: true
|
||||
mcmmo.ability.blastmining.demolitionsexpertise:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.mining.blastmining.demolitionsexpertise: true
|
||||
mcmmo.ability.blastmining.detonate:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.mining.blastmining.detonate: true
|
||||
mcmmo.ability.herbalism.greenthumbblocks:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.herbalism.greenthumb.blocks.all: true
|
||||
mcmmo.ability.herbalism.greenthumbcarrots:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.herbalism.greenthumb.plants.carrot: true
|
||||
mcmmo.ability.herbalism.greenthumbcocoa:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.herbalism.greenthumb.plants.cocoa: true
|
||||
mcmmo.ability.herbalism.greenthumbnetherwart:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.herbalism.greenthumb.plants.netherwarts: true
|
||||
mcmmo.ability.herbalism.greenthumbpotatoes:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.herbalism.greenthumb.plants.potato: true
|
||||
mcmmo.ability.herbalism.greenthumbwheat:
|
||||
default: false
|
||||
description: deprecated
|
||||
children:
|
||||
mcmmo.ability.herbalism.greenthumb.plants.crops: true
|
||||
|
Loading…
Reference in New Issue
Block a user