mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 13:46:46 +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
|
@Override
|
||||||
protected void statsDisplay() {
|
protected void statsDisplay() {
|
||||||
if (canRoll) {
|
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 }));
|
player.sendMessage(LocaleLoader.getString("Acrobatics.Roll.Chance", new Object[] { rollChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { rollChanceLucky }));
|
||||||
else
|
else
|
||||||
player.sendMessage(LocaleLoader.getString("Acrobatics.Roll.Chance", new Object[] { rollChance }));
|
player.sendMessage(LocaleLoader.getString("Acrobatics.Roll.Chance", new Object[] { rollChance }));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canGracefulRoll) {
|
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 }));
|
player.sendMessage(LocaleLoader.getString("Acrobatics.Roll.GraceChance", new Object[] { gracefulRollChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { gracefulRollChanceLucky }));
|
||||||
else
|
else
|
||||||
player.sendMessage(LocaleLoader.getString("Acrobatics.Roll.GraceChance", new Object[] { gracefulRollChance }));
|
player.sendMessage(LocaleLoader.getString("Acrobatics.Roll.GraceChance", new Object[] { gracefulRollChance }));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canDodge) {
|
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 }));
|
player.sendMessage(LocaleLoader.getString("Acrobatics.DodgeChance", new Object[] { dodgeChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { dodgeChanceLucky }));
|
||||||
else
|
else
|
||||||
player.sendMessage(LocaleLoader.getString("Acrobatics.DodgeChance", new Object[] { dodgeChance }));
|
player.sendMessage(LocaleLoader.getString("Acrobatics.DodgeChance", new Object[] { dodgeChance }));
|
||||||
|
@ -109,14 +109,14 @@ public class ArcheryCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (canDaze) {
|
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 }));
|
player.sendMessage(LocaleLoader.getString("Archery.Combat.DazeChance", new Object[] { dazeChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { dazeChanceLucky }));
|
||||||
else
|
else
|
||||||
player.sendMessage(LocaleLoader.getString("Archery.Combat.DazeChance", new Object[] { dazeChance }));
|
player.sendMessage(LocaleLoader.getString("Archery.Combat.DazeChance", new Object[] { dazeChance }));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canRetrieve) {
|
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 }));
|
player.sendMessage(LocaleLoader.getString("Archery.Combat.RetrieveChance", new Object[] { retrieveChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { retrieveChanceLucky }));
|
||||||
else
|
else
|
||||||
player.sendMessage(LocaleLoader.getString("Archery.Combat.RetrieveChance", new Object[] { retrieveChance }));
|
player.sendMessage(LocaleLoader.getString("Archery.Combat.RetrieveChance", new Object[] { retrieveChance }));
|
||||||
|
@ -126,7 +126,7 @@ public class AxesCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (canCritical) {
|
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 }));
|
player.sendMessage(LocaleLoader.getString("Axes.Combat.CritChance", new Object[] { critChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { critChanceLucky }));
|
||||||
else
|
else
|
||||||
player.sendMessage(LocaleLoader.getString("Axes.Combat.CritChance", new Object[] { critChance }));
|
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 }) }));
|
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", new Object[] { LocaleLoader.getString("Fishing.Ability.Locked.0", new Object[] { shakeUnlockLevel }) }));
|
||||||
}
|
}
|
||||||
else {
|
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 }));
|
player.sendMessage(LocaleLoader.getString("Fishing.Ability.Shake", new Object[] { shakeChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { shakeChanceLucky }));
|
||||||
else
|
else
|
||||||
player.sendMessage(LocaleLoader.getString("Fishing.Ability.Shake", new Object[] { shakeChance }));
|
player.sendMessage(LocaleLoader.getString("Fishing.Ability.Shake", new Object[] { shakeChance }));
|
||||||
|
@ -128,7 +128,7 @@ public class HerbalismCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (canGreenThumbBlocks || canGreenThumbWheat) {
|
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 }));
|
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTh.Chance", new Object[] { greenThumbChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { greenThumbChanceLucky }));
|
||||||
else
|
else
|
||||||
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTh.Chance", new Object[] { greenThumbChance }));
|
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTh.Chance", new Object[] { greenThumbChance }));
|
||||||
@ -143,7 +143,7 @@ public class HerbalismCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (canDoubleDrop && !doubleDropsDisabled) {
|
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 }));
|
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.DoubleDropChance", new Object[] { doubleDropChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { doubleDropChanceLucky }));
|
||||||
else
|
else
|
||||||
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.DoubleDropChance", new Object[] { doubleDropChance }));
|
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.DoubleDropChance", new Object[] { doubleDropChance }));
|
||||||
|
@ -161,7 +161,7 @@ public class MiningCommand extends SkillCommand {
|
|||||||
@Override
|
@Override
|
||||||
protected void statsDisplay() {
|
protected void statsDisplay() {
|
||||||
if (canDoubleDrop && !doubleDropsDisabled) {
|
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 }));
|
player.sendMessage(LocaleLoader.getString("Mining.Effect.DropChance", new Object[] { doubleDropChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { doubleDropChanceLucky }));
|
||||||
else
|
else
|
||||||
player.sendMessage(LocaleLoader.getString("Mining.Effect.DropChance", new Object[] { doubleDropChance }));
|
player.sendMessage(LocaleLoader.getString("Mining.Effect.DropChance", new Object[] { doubleDropChance }));
|
||||||
|
@ -157,7 +157,7 @@ public class RepairCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (canSuperRepair) {
|
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 }));
|
player.sendMessage(LocaleLoader.getString("Repair.Skills.Super.Chance", new Object[] { superRepairChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { superRepairChanceLucky }));
|
||||||
else
|
else
|
||||||
player.sendMessage(LocaleLoader.getString("Repair.Skills.Super.Chance", new Object[] { superRepairChance }));
|
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 int bleedBaseTicks = advancedConfig.getBleedBaseTicks();
|
||||||
private float counterChanceMax = advancedConfig.getCounterChanceMax();
|
private float counterChanceMax = advancedConfig.getCounterChanceMax();
|
||||||
private float counterMaxLevel = advancedConfig.getCounterMaxBonusLevel();
|
private float counterMaxLevel = advancedConfig.getCounterMaxBonusLevel();
|
||||||
private int serratedBleedTicks = advancedConfig.getSerratedStrikesTicks();
|
|
||||||
|
|
||||||
private boolean canCounter;
|
private boolean canCounter;
|
||||||
private boolean canSerratedStrike;
|
private boolean canSerratedStrike;
|
||||||
@ -103,7 +102,7 @@ public class SwordsCommand extends SkillCommand {
|
|||||||
@Override
|
@Override
|
||||||
protected void statsDisplay() {
|
protected void statsDisplay() {
|
||||||
if (canCounter) {
|
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 }));
|
player.sendMessage(LocaleLoader.getString("Swords.Combat.Counter.Chance", new Object[] { counterAttackChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { counterAttackChanceLucky }));
|
||||||
else
|
else
|
||||||
player.sendMessage(LocaleLoader.getString("Swords.Combat.Counter.Chance", new Object[] { counterAttackChance }));
|
player.sendMessage(LocaleLoader.getString("Swords.Combat.Counter.Chance", new Object[] { counterAttackChance }));
|
||||||
@ -112,7 +111,7 @@ public class SwordsCommand extends SkillCommand {
|
|||||||
if (canBleed) {
|
if (canBleed) {
|
||||||
player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Length", new Object[] { bleedLength }));
|
player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Length", new Object[] { bleedLength }));
|
||||||
player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Note"));
|
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 }));
|
player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Chance", new Object[] { bleedChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { bleedChanceLucky }));
|
||||||
else
|
else
|
||||||
player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Chance", new Object[] { bleedChance }));
|
player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Chance", new Object[] { bleedChance }));
|
||||||
|
@ -165,7 +165,7 @@ public class TamingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (canGore) {
|
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 }));
|
player.sendMessage(LocaleLoader.getString("Taming.Combat.Chance.Gore", new Object[] { goreChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { goreChanceLucky }));
|
||||||
else
|
else
|
||||||
player.sendMessage(LocaleLoader.getString("Taming.Combat.Chance.Gore", new Object[] { goreChance }));
|
player.sendMessage(LocaleLoader.getString("Taming.Combat.Chance.Gore", new Object[] { goreChance }));
|
||||||
|
@ -110,14 +110,14 @@ public class UnarmedCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (canDeflect) {
|
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 }));
|
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.ArrowDeflect", new Object[] { deflectChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { deflectChanceLucky }));
|
||||||
else
|
else
|
||||||
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.ArrowDeflect", new Object[] { deflectChance }));
|
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.ArrowDeflect", new Object[] { deflectChance }));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canDisarm) {
|
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 }));
|
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.Disarm", new Object[] { disarmChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { disarmChanceLucky }));
|
||||||
else
|
else
|
||||||
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.Disarm", new Object[] { disarmChance }));
|
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.Disarm", new Object[] { disarmChance }));
|
||||||
|
@ -99,7 +99,7 @@ public class WoodcuttingCommand extends SkillCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (canDoubleDrop && !doubleDropsDisabled) {
|
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 }));
|
player.sendMessage(LocaleLoader.getString("Woodcutting.Ability.Chance.DDrop", new Object[] { doubleDropChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { doubleDropChanceLucky }));
|
||||||
else
|
else
|
||||||
player.sendMessage(LocaleLoader.getString("Woodcutting.Ability.Chance.DDrop", new Object[] { doubleDropChance }));
|
player.sendMessage(LocaleLoader.getString("Woodcutting.Ability.Chance.DDrop", new Object[] { doubleDropChance }));
|
||||||
|
Loading…
Reference in New Issue
Block a user