mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-03 18:33:16 +01:00
Use lucky variable; Don't use the actual permission node when not needed.
This commit is contained in:
parent
3f899380d9
commit
e01b6f175c
@ -106,21 +106,21 @@ public class AcrobaticsCommand extends SkillCommand {
|
||||
@Override
|
||||
protected void statsDisplay() {
|
||||
if (canRoll) {
|
||||
if (player.hasPermission("mcmmo.perks.lucky.acrobatics"))
|
||||
if (lucky)
|
||||
player.sendMessage(LocaleLoader.getString("Acrobatics.Roll.Chance", new Object[] { rollChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { rollChanceLucky }));
|
||||
else
|
||||
player.sendMessage(LocaleLoader.getString("Acrobatics.Roll.Chance", new Object[] { rollChance }));
|
||||
}
|
||||
|
||||
if (canGracefulRoll) {
|
||||
if (player.hasPermission("mcmmo.perks.lucky.acrobatics"))
|
||||
if (lucky)
|
||||
player.sendMessage(LocaleLoader.getString("Acrobatics.Roll.GraceChance", new Object[] { gracefulRollChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { gracefulRollChanceLucky }));
|
||||
else
|
||||
player.sendMessage(LocaleLoader.getString("Acrobatics.Roll.GraceChance", new Object[] { gracefulRollChance }));
|
||||
}
|
||||
|
||||
if (canDodge) {
|
||||
if (player.hasPermission("mcmmo.perks.lucky.acrobatics"))
|
||||
if (lucky)
|
||||
player.sendMessage(LocaleLoader.getString("Acrobatics.DodgeChance", new Object[] { dodgeChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { dodgeChanceLucky }));
|
||||
else
|
||||
player.sendMessage(LocaleLoader.getString("Acrobatics.DodgeChance", new Object[] { dodgeChance }));
|
||||
|
@ -109,14 +109,14 @@ public class ArcheryCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
if (canDaze) {
|
||||
if (player.hasPermission("mcmmo.perks.lucky.archery"))
|
||||
if (lucky)
|
||||
player.sendMessage(LocaleLoader.getString("Archery.Combat.DazeChance", new Object[] { dazeChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { dazeChanceLucky }));
|
||||
else
|
||||
player.sendMessage(LocaleLoader.getString("Archery.Combat.DazeChance", new Object[] { dazeChance }));
|
||||
}
|
||||
|
||||
if (canRetrieve) {
|
||||
if (player.hasPermission("mcmmo.perks.lucky.archery"))
|
||||
if (lucky)
|
||||
player.sendMessage(LocaleLoader.getString("Archery.Combat.RetrieveChance", new Object[] { retrieveChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { retrieveChanceLucky }));
|
||||
else
|
||||
player.sendMessage(LocaleLoader.getString("Archery.Combat.RetrieveChance", new Object[] { retrieveChance }));
|
||||
|
@ -126,7 +126,7 @@ public class AxesCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
if (canCritical) {
|
||||
if (player.hasPermission("mcmmo.perks.lucky.axes"))
|
||||
if (lucky)
|
||||
player.sendMessage(LocaleLoader.getString("Axes.Combat.CritChance", new Object[] { critChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { critChanceLucky }));
|
||||
else
|
||||
player.sendMessage(LocaleLoader.getString("Axes.Combat.CritChance", new Object[] { critChance }));
|
||||
|
@ -112,7 +112,7 @@ public class FishingCommand extends SkillCommand {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", new Object[] { LocaleLoader.getString("Fishing.Ability.Locked.0", new Object[] { shakeUnlockLevel }) }));
|
||||
}
|
||||
else {
|
||||
if (player.hasPermission("mcmmo.perks.lucky.fishing"))
|
||||
if (lucky)
|
||||
player.sendMessage(LocaleLoader.getString("Fishing.Ability.Shake", new Object[] { shakeChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { shakeChanceLucky }));
|
||||
else
|
||||
player.sendMessage(LocaleLoader.getString("Fishing.Ability.Shake", new Object[] { shakeChance }));
|
||||
|
@ -128,7 +128,7 @@ public class HerbalismCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
if (canGreenThumbBlocks || canGreenThumbWheat) {
|
||||
if (player.hasPermission("mcmmo.perks.lucky.herbalism"))
|
||||
if (lucky)
|
||||
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTh.Chance", new Object[] { greenThumbChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { greenThumbChanceLucky }));
|
||||
else
|
||||
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTh.Chance", new Object[] { greenThumbChance }));
|
||||
@ -143,7 +143,7 @@ public class HerbalismCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
if (canDoubleDrop && !doubleDropsDisabled) {
|
||||
if (player.hasPermission("mcmmo.perks.lucky.herbalism"))
|
||||
if (lucky)
|
||||
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.DoubleDropChance", new Object[] { doubleDropChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { doubleDropChanceLucky }));
|
||||
else
|
||||
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.DoubleDropChance", new Object[] { doubleDropChance }));
|
||||
|
@ -161,7 +161,7 @@ public class MiningCommand extends SkillCommand {
|
||||
@Override
|
||||
protected void statsDisplay() {
|
||||
if (canDoubleDrop && !doubleDropsDisabled) {
|
||||
if (player.hasPermission("mcmmo.perks.lucky.mining"))
|
||||
if (lucky)
|
||||
player.sendMessage(LocaleLoader.getString("Mining.Effect.DropChance", new Object[] { doubleDropChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { doubleDropChanceLucky }));
|
||||
else
|
||||
player.sendMessage(LocaleLoader.getString("Mining.Effect.DropChance", new Object[] { doubleDropChance }));
|
||||
|
@ -157,7 +157,7 @@ public class RepairCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
if (canSuperRepair) {
|
||||
if (player.hasPermission("mcmmo.perks.lucky.repair"))
|
||||
if (lucky)
|
||||
player.sendMessage(LocaleLoader.getString("Repair.Skills.Super.Chance", new Object[] { superRepairChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { superRepairChanceLucky }));
|
||||
else
|
||||
player.sendMessage(LocaleLoader.getString("Repair.Skills.Super.Chance", new Object[] { superRepairChance }));
|
||||
|
@ -27,7 +27,6 @@ public class SwordsCommand extends SkillCommand {
|
||||
private int bleedBaseTicks = advancedConfig.getBleedBaseTicks();
|
||||
private float counterChanceMax = advancedConfig.getCounterChanceMax();
|
||||
private float counterMaxLevel = advancedConfig.getCounterMaxBonusLevel();
|
||||
private int serratedBleedTicks = advancedConfig.getSerratedStrikesTicks();
|
||||
|
||||
private boolean canCounter;
|
||||
private boolean canSerratedStrike;
|
||||
@ -103,7 +102,7 @@ public class SwordsCommand extends SkillCommand {
|
||||
@Override
|
||||
protected void statsDisplay() {
|
||||
if (canCounter) {
|
||||
if (player.hasPermission("mcmmo.perks.lucky.swords"))
|
||||
if (lucky)
|
||||
player.sendMessage(LocaleLoader.getString("Swords.Combat.Counter.Chance", new Object[] { counterAttackChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { counterAttackChanceLucky }));
|
||||
else
|
||||
player.sendMessage(LocaleLoader.getString("Swords.Combat.Counter.Chance", new Object[] { counterAttackChance }));
|
||||
@ -112,7 +111,7 @@ public class SwordsCommand extends SkillCommand {
|
||||
if (canBleed) {
|
||||
player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Length", new Object[] { bleedLength }));
|
||||
player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Note"));
|
||||
if (player.hasPermission("mcmmo.perks.lucky.swords"))
|
||||
if (lucky)
|
||||
player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Chance", new Object[] { bleedChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { bleedChanceLucky }));
|
||||
else
|
||||
player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Chance", new Object[] { bleedChance }));
|
||||
|
@ -165,7 +165,7 @@ public class TamingCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
if (canGore) {
|
||||
if (player.hasPermission("mcmmo.perks.lucky.taming"))
|
||||
if (lucky)
|
||||
player.sendMessage(LocaleLoader.getString("Taming.Combat.Chance.Gore", new Object[] { goreChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { goreChanceLucky }));
|
||||
else
|
||||
player.sendMessage(LocaleLoader.getString("Taming.Combat.Chance.Gore", new Object[] { goreChance }));
|
||||
|
@ -110,14 +110,14 @@ public class UnarmedCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
if (canDeflect) {
|
||||
if (player.hasPermission("mcmmo.perks.lucky.unarmed"))
|
||||
if (lucky)
|
||||
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.ArrowDeflect", new Object[] { deflectChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { deflectChanceLucky }));
|
||||
else
|
||||
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.ArrowDeflect", new Object[] { deflectChance }));
|
||||
}
|
||||
|
||||
if (canDisarm) {
|
||||
if (player.hasPermission("mcmmo.perks.lucky.unarmed"))
|
||||
if (lucky)
|
||||
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.Disarm", new Object[] { disarmChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { disarmChanceLucky }));
|
||||
else
|
||||
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.Disarm", new Object[] { disarmChance }));
|
||||
|
@ -99,7 +99,7 @@ public class WoodcuttingCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
if (canDoubleDrop && !doubleDropsDisabled) {
|
||||
if (player.hasPermission("mcmmo.perks.lucky.woodcutting"))
|
||||
if (lucky)
|
||||
player.sendMessage(LocaleLoader.getString("Woodcutting.Ability.Chance.DDrop", new Object[] { doubleDropChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { doubleDropChanceLucky }));
|
||||
else
|
||||
player.sendMessage(LocaleLoader.getString("Woodcutting.Ability.Chance.DDrop", new Object[] { doubleDropChance }));
|
||||
|
Loading…
Reference in New Issue
Block a user