Add localized skill names to Perks.Lucky.Desc in skill commands.

This commit is contained in:
GJ 2013-01-15 23:30:58 -05:00
parent 793538d4ef
commit d673676a8a
12 changed files with 22 additions and 12 deletions

View File

@ -7,6 +7,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.datatypes.SkillType; import com.gmail.nossr50.datatypes.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.skills.acrobatics.Acrobatics; import com.gmail.nossr50.skills.acrobatics.Acrobatics;
import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
public class AcrobaticsCommand extends SkillCommand { public class AcrobaticsCommand extends SkillCommand {
@ -73,7 +74,7 @@ public class AcrobaticsCommand extends SkillCommand {
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Acrobatics" }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Misc.getCapitalized(LocaleLoader.getString("Acrobatics.SkillName")) }) }));
} }
if (canRoll) { if (canRoll) {

View File

@ -7,6 +7,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.datatypes.SkillType; import com.gmail.nossr50.datatypes.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.skills.archery.Archery; import com.gmail.nossr50.skills.archery.Archery;
import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
public class ArcheryCommand extends SkillCommand { public class ArcheryCommand extends SkillCommand {
@ -69,7 +70,7 @@ public class ArcheryCommand extends SkillCommand {
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Archery" }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Misc.getCapitalized(LocaleLoader.getString("Archery.SkillName")) }) }));
} }
if (canSkillShot) { if (canSkillShot) {

View File

@ -92,7 +92,7 @@ public class AxesCommand extends SkillCommand {
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Axes" }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Misc.getCapitalized(LocaleLoader.getString("Axes.SkillName")) }) }));
} }
if (canSkullSplitter) { if (canSkullSplitter) {

View File

@ -6,6 +6,7 @@ import com.gmail.nossr50.commands.SkillCommand;
import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.datatypes.SkillType; import com.gmail.nossr50.datatypes.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
public class ExcavationCommand extends SkillCommand { public class ExcavationCommand extends SkillCommand {
@ -62,7 +63,7 @@ public class ExcavationCommand extends SkillCommand {
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Excavation" }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Misc.getCapitalized(LocaleLoader.getString("Excavation.SkillName")) }) }));
} }
if (canGigaDrill) { if (canGigaDrill) {

View File

@ -7,6 +7,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.datatypes.SkillType; import com.gmail.nossr50.datatypes.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.skills.gathering.Fishing; import com.gmail.nossr50.skills.gathering.Fishing;
import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
public class FishingCommand extends SkillCommand { public class FishingCommand extends SkillCommand {
@ -82,7 +83,7 @@ public class FishingCommand extends SkillCommand {
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Fishing" }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Misc.getCapitalized(LocaleLoader.getString("Fishing.SkillName")) }) }));
} }
if (canTreasureHunt) { if (canTreasureHunt) {

View File

@ -7,6 +7,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.datatypes.SkillType; import com.gmail.nossr50.datatypes.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
public class HerbalismCommand extends SkillCommand { public class HerbalismCommand extends SkillCommand {
@ -109,7 +110,7 @@ public class HerbalismCommand extends SkillCommand {
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Herbalism" }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Misc.getCapitalized(LocaleLoader.getString("Herbalism.SkillName")) }) }));
} }
if (canGreenTerra) { if (canGreenTerra) {

View File

@ -145,7 +145,7 @@ public class MiningCommand extends SkillCommand {
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Mining" }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Misc.getCapitalized(LocaleLoader.getString("Mining.SkillName")) }) }));
} }
if (canSuperBreaker) { if (canSuperBreaker) {

View File

@ -10,6 +10,7 @@ import com.gmail.nossr50.datatypes.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.skills.repair.Repair; import com.gmail.nossr50.skills.repair.Repair;
import com.gmail.nossr50.skills.repair.Repairable; import com.gmail.nossr50.skills.repair.Repairable;
import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
public class RepairCommand extends SkillCommand { public class RepairCommand extends SkillCommand {
@ -102,7 +103,7 @@ public class RepairCommand extends SkillCommand {
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Repair" }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Misc.getCapitalized(LocaleLoader.getString("Repair.SkillName")) }) }));
} }
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Repair.Effect.0"), LocaleLoader.getString("Repair.Effect.1") })); player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Repair.Effect.0"), LocaleLoader.getString("Repair.Effect.1") }));

View File

@ -6,6 +6,7 @@ import com.gmail.nossr50.commands.SkillCommand;
import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.datatypes.SkillType; import com.gmail.nossr50.datatypes.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
public class SwordsCommand extends SkillCommand { public class SwordsCommand extends SkillCommand {
@ -96,7 +97,7 @@ public class SwordsCommand extends SkillCommand {
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Swords" }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Misc.getCapitalized(LocaleLoader.getString("Swords.SkillName")) }) }));
} }
if (canCounter) { if (canCounter) {

View File

@ -7,6 +7,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.datatypes.SkillType; import com.gmail.nossr50.datatypes.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
public class TamingCommand extends SkillCommand { public class TamingCommand extends SkillCommand {
@ -69,7 +70,7 @@ public class TamingCommand extends SkillCommand {
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Taming" }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Misc.getCapitalized(LocaleLoader.getString("Taming.SkillName")) }) }));
} }
Config configInstance = Config.getInstance(); Config configInstance = Config.getInstance();

View File

@ -6,6 +6,7 @@ import com.gmail.nossr50.commands.SkillCommand;
import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.datatypes.SkillType; import com.gmail.nossr50.datatypes.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
public class UnarmedCommand extends SkillCommand { public class UnarmedCommand extends SkillCommand {
@ -98,7 +99,7 @@ public class UnarmedCommand extends SkillCommand {
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Unarmed" }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Misc.getCapitalized(LocaleLoader.getString("Unarmed.SkillName")) }) }));
} }
if (canBerserk) { if (canBerserk) {

View File

@ -7,6 +7,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.datatypes.SkillType; import com.gmail.nossr50.datatypes.SkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
public class WoodcuttingCommand extends SkillCommand { public class WoodcuttingCommand extends SkillCommand {
@ -84,7 +85,7 @@ public class WoodcuttingCommand extends SkillCommand {
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { "Woodcutting" }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Misc.getCapitalized(LocaleLoader.getString("Woodcutting.SkillName")) }) }));
} }
if (canTreeFell) { if (canTreeFell) {