More localization updates.

This commit is contained in:
GJ 2013-01-16 14:03:07 -05:00
parent 55f824e0c8
commit 957605d46b
21 changed files with 94 additions and 136 deletions

View File

@ -1,18 +1,13 @@
package com.gmail.nossr50.commands.skills; package com.gmail.nossr50.commands.skills;
import org.bukkit.ChatColor;
import com.gmail.nossr50.commands.SkillCommand; import com.gmail.nossr50.commands.SkillCommand;
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;
import com.gmail.nossr50.util.Skills;
public class AcrobaticsCommand extends SkillCommand { public class AcrobaticsCommand extends SkillCommand {
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
private String dodgeChance; private String dodgeChance;
private String dodgeChanceLucky; private String dodgeChanceLucky;
private String rollChance; private String rollChance;
@ -73,8 +68,8 @@ public class AcrobaticsCommand extends SkillCommand {
@Override @Override
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = LocaleLoader.getString("MOTD.PerksPrefix");
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")) }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Skills.localizeSkillName(SkillType.ACROBATICS) }) }));
} }
if (canRoll) { if (canRoll) {

View File

@ -1,18 +1,13 @@
package com.gmail.nossr50.commands.skills; package com.gmail.nossr50.commands.skills;
import org.bukkit.ChatColor;
import com.gmail.nossr50.commands.SkillCommand; import com.gmail.nossr50.commands.SkillCommand;
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;
import com.gmail.nossr50.util.Skills;
public class ArcheryCommand extends SkillCommand { public class ArcheryCommand extends SkillCommand {
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
private String skillShotBonus; private String skillShotBonus;
private String dazeChance; private String dazeChance;
private String dazeChanceLucky; private String dazeChanceLucky;
@ -69,8 +64,8 @@ public class ArcheryCommand extends SkillCommand {
@Override @Override
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = LocaleLoader.getString("MOTD.PerksPrefix");
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")) }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Skills.localizeSkillName(SkillType.ARCHERY) }) }));
} }
if (canSkillShot) { if (canSkillShot) {

View File

@ -1,18 +1,14 @@
package com.gmail.nossr50.commands.skills; package com.gmail.nossr50.commands.skills;
import org.bukkit.ChatColor;
import com.gmail.nossr50.commands.SkillCommand; import com.gmail.nossr50.commands.SkillCommand;
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.axes.Axes; import com.gmail.nossr50.skills.axes.Axes;
import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.Skills;
public class AxesCommand extends SkillCommand { public class AxesCommand extends SkillCommand {
AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
private String critChance; private String critChance;
private String critChanceLucky; private String critChanceLucky;
private String bonusDamage; private String bonusDamage;
@ -91,8 +87,8 @@ public class AxesCommand extends SkillCommand {
@Override @Override
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = LocaleLoader.getString("MOTD.PerksPrefix");
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")) }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Skills.localizeSkillName(SkillType.AXES) }) }));
} }
if (canSkullSplitter) { if (canSkullSplitter) {

View File

@ -1,13 +1,11 @@
package com.gmail.nossr50.commands.skills; package com.gmail.nossr50.commands.skills;
import org.bukkit.ChatColor;
import com.gmail.nossr50.commands.SkillCommand; 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;
import com.gmail.nossr50.util.Skills;
public class ExcavationCommand extends SkillCommand { public class ExcavationCommand extends SkillCommand {
AdvancedConfig advancedConfig = AdvancedConfig.getInstance(); AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
@ -62,8 +60,8 @@ public class ExcavationCommand extends SkillCommand {
@Override @Override
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = LocaleLoader.getString("MOTD.PerksPrefix");
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")) }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Skills.localizeSkillName(SkillType.EXCAVATION) }) }));
} }
if (canGigaDrill) { if (canGigaDrill) {

View File

@ -1,14 +1,12 @@
package com.gmail.nossr50.commands.skills; package com.gmail.nossr50.commands.skills;
import org.bukkit.ChatColor;
import com.gmail.nossr50.commands.SkillCommand; 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.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;
import com.gmail.nossr50.util.Skills;
public class FishingCommand extends SkillCommand { public class FishingCommand extends SkillCommand {
@ -82,8 +80,8 @@ public class FishingCommand extends SkillCommand {
@Override @Override
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = LocaleLoader.getString("MOTD.PerksPrefix");
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")) }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Skills.localizeSkillName(SkillType.FISHING) }) }));
} }
if (canTreasureHunt) { if (canTreasureHunt) {

View File

@ -1,14 +1,12 @@
package com.gmail.nossr50.commands.skills; package com.gmail.nossr50.commands.skills;
import org.bukkit.ChatColor;
import com.gmail.nossr50.commands.SkillCommand; import com.gmail.nossr50.commands.SkillCommand;
import com.gmail.nossr50.config.AdvancedConfig; 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;
import com.gmail.nossr50.util.Skills;
public class HerbalismCommand extends SkillCommand { public class HerbalismCommand extends SkillCommand {
AdvancedConfig advancedConfig = AdvancedConfig.getInstance(); AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
@ -109,8 +107,8 @@ public class HerbalismCommand extends SkillCommand {
@Override @Override
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = LocaleLoader.getString("MOTD.PerksPrefix");
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")) }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Skills.localizeSkillName(SkillType.HERBALISM) }) }));
} }
if (canGreenTerra) { if (canGreenTerra) {

View File

@ -1,7 +1,5 @@
package com.gmail.nossr50.commands.skills; package com.gmail.nossr50.commands.skills;
import org.bukkit.ChatColor;
import com.gmail.nossr50.commands.SkillCommand; import com.gmail.nossr50.commands.SkillCommand;
import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.Config;
@ -9,6 +7,7 @@ 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.Misc;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.Skills;
public class MiningCommand extends SkillCommand { public class MiningCommand extends SkillCommand {
AdvancedConfig advancedConfig = AdvancedConfig.getInstance(); AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
@ -144,8 +143,8 @@ public class MiningCommand extends SkillCommand {
@Override @Override
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = LocaleLoader.getString("MOTD.PerksPrefix");
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")) }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Skills.localizeSkillName(SkillType.MINING) }) }));
} }
if (canSuperBreaker) { if (canSuperBreaker) {

View File

@ -1,7 +1,5 @@
package com.gmail.nossr50.commands.skills; package com.gmail.nossr50.commands.skills;
import org.bukkit.ChatColor;
import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.commands.SkillCommand; import com.gmail.nossr50.commands.SkillCommand;
import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.AdvancedConfig;
@ -10,8 +8,8 @@ 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;
import com.gmail.nossr50.util.Skills;
public class RepairCommand extends SkillCommand { public class RepairCommand extends SkillCommand {
AdvancedConfig advancedConfig = AdvancedConfig.getInstance(); AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
@ -102,8 +100,8 @@ public class RepairCommand extends SkillCommand {
@Override @Override
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = LocaleLoader.getString("MOTD.PerksPrefix");
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(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Skills.localizeSkillName(SkillType.REPAIR) }) }));
} }
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

@ -1,13 +1,11 @@
package com.gmail.nossr50.commands.skills; package com.gmail.nossr50.commands.skills;
import org.bukkit.ChatColor;
import com.gmail.nossr50.commands.SkillCommand; 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;
import com.gmail.nossr50.util.Skills;
public class SwordsCommand extends SkillCommand { public class SwordsCommand extends SkillCommand {
AdvancedConfig advancedConfig = AdvancedConfig.getInstance(); AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
@ -96,8 +94,8 @@ public class SwordsCommand extends SkillCommand {
@Override @Override
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = LocaleLoader.getString("MOTD.PerksPrefix");
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")) }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Skills.localizeSkillName(SkillType.SWORDS) }) }));
} }
if (canCounter) { if (canCounter) {

View File

@ -1,14 +1,12 @@
package com.gmail.nossr50.commands.skills; package com.gmail.nossr50.commands.skills;
import org.bukkit.ChatColor;
import com.gmail.nossr50.commands.SkillCommand; import com.gmail.nossr50.commands.SkillCommand;
import com.gmail.nossr50.config.AdvancedConfig; 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;
import com.gmail.nossr50.util.Skills;
public class TamingCommand extends SkillCommand { public class TamingCommand extends SkillCommand {
AdvancedConfig advancedConfig = AdvancedConfig.getInstance(); AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
@ -69,8 +67,8 @@ public class TamingCommand extends SkillCommand {
@Override @Override
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = LocaleLoader.getString("MOTD.PerksPrefix");
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")) }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Skills.localizeSkillName(SkillType.TAMING) }) }));
} }
Config configInstance = Config.getInstance(); Config configInstance = Config.getInstance();

View File

@ -1,13 +1,11 @@
package com.gmail.nossr50.commands.skills; package com.gmail.nossr50.commands.skills;
import org.bukkit.ChatColor;
import com.gmail.nossr50.commands.SkillCommand; 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;
import com.gmail.nossr50.util.Skills;
public class UnarmedCommand extends SkillCommand { public class UnarmedCommand extends SkillCommand {
AdvancedConfig advancedConfig = AdvancedConfig.getInstance(); AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
@ -98,8 +96,8 @@ public class UnarmedCommand extends SkillCommand {
@Override @Override
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = LocaleLoader.getString("MOTD.PerksPrefix");
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")) }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Skills.localizeSkillName(SkillType.UNARMED) }) }));
} }
if (canBerserk) { if (canBerserk) {

View File

@ -1,14 +1,12 @@
package com.gmail.nossr50.commands.skills; package com.gmail.nossr50.commands.skills;
import org.bukkit.ChatColor;
import com.gmail.nossr50.commands.SkillCommand; import com.gmail.nossr50.commands.SkillCommand;
import com.gmail.nossr50.config.AdvancedConfig; 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;
import com.gmail.nossr50.util.Skills;
public class WoodcuttingCommand extends SkillCommand { public class WoodcuttingCommand extends SkillCommand {
AdvancedConfig advancedConfig = AdvancedConfig.getInstance(); AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
@ -84,8 +82,8 @@ public class WoodcuttingCommand extends SkillCommand {
@Override @Override
protected void effectsDisplay() { protected void effectsDisplay() {
if (lucky) { if (lucky) {
String perkPrefix = ChatColor.RED + "[mcMMO Perks] "; String perkPrefix = LocaleLoader.getString("MOTD.PerksPrefix");
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")) }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", new Object[] { Skills.localizeSkillName(SkillType.WOODCUTTING) }) }));
} }
if (canTreeFell) { if (canTreeFell) {

View File

@ -1,6 +1,5 @@
package com.gmail.nossr50.listeners; package com.gmail.nossr50.listeners;
import org.bukkit.ChatColor;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
@ -185,19 +184,19 @@ public class PlayerListener implements Listener {
//TODO: Locale ALL the things. //TODO: Locale ALL the things.
if (Config.getInstance().getMOTDEnabled() && Permissions.motd(player)) { if (Config.getInstance().getMOTDEnabled() && Permissions.motd(player)) {
String prefix = ChatColor.GOLD + "[mcMMO] "; String perkPrefix = LocaleLoader.getString("MOTD.PerksPrefix");
String perkPrefix = ChatColor.RED + "[mcMMO Perks] ";
player.sendMessage(prefix + ChatColor.YELLOW + "Running version " + ChatColor.DARK_AQUA + plugin.getDescription().getVersion()); //TODO: Locale player.sendMessage(LocaleLoader.getString("MOTD.Version", new Object[] {plugin.getDescription().getVersion()}));
if (Config.getInstance().getHardcoreEnabled()) { if (Config.getInstance().getHardcoreEnabled()) {
if (Config.getInstance().getHardcoreVampirismEnabled()) { if (Config.getInstance().getHardcoreVampirismEnabled()) {
player.sendMessage(prefix + ChatColor.DARK_RED + "Hardcore & Vampirism enabled."); player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.VampireOn"));
player.sendMessage(prefix + ChatColor.DARK_AQUA + "Skill Death Penalty: " + ChatColor.DARK_RED + Config.getInstance().getHardcoreDeathStatPenaltyPercentage() + "% " + ChatColor.DARK_AQUA + "Vampirism Stat Leech: " + ChatColor.DARK_RED + Config.getInstance().getHardcoreVampirismStatLeechPercentage() + "%"); player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.Stats", new Object[] {Config.getInstance().getHardcoreDeathStatPenaltyPercentage()}));
player.sendMessage(LocaleLoader.getString("MOTD.Vampire.Stats", new Object[] {Config.getInstance().getHardcoreVampirismStatLeechPercentage()}));
} }
else { else {
player.sendMessage(prefix + ChatColor.DARK_RED + "Hardcore enabled."); player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.VampireOff"));
player.sendMessage(prefix + ChatColor.DARK_AQUA + "Skill Death Penalty: " + ChatColor.DARK_RED + Config.getInstance().getHardcoreDeathStatPenaltyPercentage() + "%"); player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.Stats", new Object[] {Config.getInstance().getHardcoreDeathStatPenaltyPercentage()}));
} }
} }
@ -237,46 +236,11 @@ public class PlayerListener implements Listener {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.activationtime.name"), LocaleLoader.getString("Perks.activationtime.desc", new Object[] { 4 }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.activationtime.name"), LocaleLoader.getString("Perks.activationtime.desc", new Object[] { 4 }) }));
} }
if (Permissions.luckyAcrobatics(player)) { if (Permissions.luckyAcrobatics(player) || Permissions.luckyArchery(player) || Permissions.luckyAxes(player) || Permissions.luckyFishing(player) || Permissions.luckyHerbalism(player) || Permissions.luckyMining(player) || Permissions.luckyRepair(player) || Permissions.luckySwords(player) || Permissions.luckyTaming(player) || Permissions.luckyUnarmed(player) || Permissions.luckyWoodcutting(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
}
else if (Permissions.luckyArchery(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
}
else if (Permissions.luckyAxes(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
}
else if (Permissions.luckyExcavation(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
}
else if (Permissions.luckyFishing(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
}
else if (Permissions.luckyHerbalism(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
}
else if (Permissions.luckyMining(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
}
else if (Permissions.luckyRepair(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
}
else if (Permissions.luckySwords(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
}
else if (Permissions.luckyTaming(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
}
else if (Permissions.luckyUnarmed(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
}
else if (Permissions.luckyWoodcutting(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login") }));
} }
player.sendMessage(ChatColor.GOLD+"[mcMMO] " + ChatColor.GREEN + "http://www.mcmmo.info" + ChatColor.YELLOW + " - mcMMO Website & Forums"); //TODO: Locale player.sendMessage(LocaleLoader.getString("MOTD.Website", new Object[] {plugin.getDescription().getWebsite()}));
//player.sendMessage(LocaleLoader.getString("mcMMO.MOTD", new Object[] {plugin.getDescription().getVersion()}));
//player.sendMessage(LocaleLoader.getString("mcMMO.Website"));
} }
//THIS IS VERY BAD WAY TO DO THINGS, NEED BETTER WAY //THIS IS VERY BAD WAY TO DO THINGS, NEED BETTER WAY
@ -452,12 +416,10 @@ public class PlayerListener implements Listener {
return; return;
} }
String prefix = ChatColor.GREEN + "(" + ChatColor.WHITE + playerName + ChatColor.GREEN + ") ";
plugin.getLogger().info("[P](" + partyName + ")" + "<" + playerName + "> " + chatEvent.getMessage()); plugin.getLogger().info("[P](" + partyName + ")" + "<" + playerName + "> " + chatEvent.getMessage());
for (Player member : party.getOnlineMembers()) { for (Player member : party.getOnlineMembers()) {
member.sendMessage(prefix + chatEvent.getMessage()); member.sendMessage(LocaleLoader.getString("Commands.Party.Chat.Prefix", new Object[] {playerName}) + chatEvent.getMessage());
} }
event.setCancelled(true); event.setCancelled(true);
@ -471,13 +433,11 @@ public class PlayerListener implements Listener {
return; return;
} }
String prefix = ChatColor.AQUA + "{" + ChatColor.WHITE + playerName + ChatColor.AQUA + "} ";
plugin.getLogger().info("[A]<" + playerName + "> " + chatEvent.getMessage()); plugin.getLogger().info("[A]<" + playerName + "> " + chatEvent.getMessage());
for (Player otherPlayer : plugin.getServer().getOnlinePlayers()) { for (Player otherPlayer : plugin.getServer().getOnlinePlayers()) {
if (Permissions.adminChat(otherPlayer) || otherPlayer.isOp()) { if (Permissions.adminChat(otherPlayer) || otherPlayer.isOp()) {
otherPlayer.sendMessage(prefix + chatEvent.getMessage()); otherPlayer.sendMessage(LocaleLoader.getString("Commands.AdminChat.Prefix", new Object[] {playerName}) + chatEvent.getMessage());
} }
} }

View File

@ -3,13 +3,13 @@ package com.gmail.nossr50.runnables;
import java.util.Map; import java.util.Map;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.datatypes.SkillType; import com.gmail.nossr50.datatypes.SkillType;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Database; import com.gmail.nossr50.util.Database;
import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.Skills;
public class mcRankAsync implements Runnable { public class mcRankAsync implements Runnable {
private Database database = mcMMO.getPlayerDatabase(); private Database database = mcMMO.getPlayerDatabase();
@ -31,12 +31,22 @@ public class mcRankAsync implements Runnable {
for (SkillType skillType : SkillType.values()) { for (SkillType skillType : SkillType.values()) {
if (skillType.equals(SkillType.ALL)) if (skillType.equals(SkillType.ALL))
continue; // We want the overall ranking to be at the bottom continue; // We want the overall ranking to be at the bottom
sender.sendMessage(ChatColor.YELLOW + Misc.getCapitalized(skillType.name()) + ChatColor.GREEN + " - " + (skills.get(skillType.name()) == null ? ChatColor.WHITE + "Unranked" : ChatColor.GOLD + "Rank " + ChatColor.WHITE + "#" + ChatColor.GREEN + skills.get(skillType.name())));
if (skills.get(skillType.name()) == null) {
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Skill", new Object[] {Skills.localizeSkillName(skillType), LocaleLoader.getString("Commands.mcrank.Unranked")} ));
}
else {
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Skill", new Object[] {Skills.localizeSkillName(skillType), skills.get(skillType.name())} ));
} }
sender.sendMessage(ChatColor.YELLOW + "Overall" + ChatColor.GREEN + " - " + (skills.get("ALL") == null ? ChatColor.WHITE + "Unranked" : ChatColor.GOLD + "Rank " + ChatColor.WHITE + "#" + ChatColor.GREEN + skills.get("ALL")));
} }
if (skills.get("ALL") == null) {
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Overall", new Object[] {LocaleLoader.getString("Commands.mcrank.Unranked")} ));
}
else {
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Overall", new Object[] {skills.get("ALL")} ));
}
}
}, 1L); }, 1L);
} }

View File

@ -26,6 +26,7 @@ import com.gmail.nossr50.datatypes.SkillType;
import com.gmail.nossr50.listeners.SpoutListener; import com.gmail.nossr50.listeners.SpoutListener;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Skills;
import com.gmail.nossr50.util.Users; import com.gmail.nossr50.util.Users;
public class SpoutStuff { public class SpoutStuff {
@ -548,7 +549,7 @@ public class SpoutStuff {
break; break;
} }
spoutPlayer.sendNotification(LocaleLoader.getString("Spout.LevelUp.1"), LocaleLoader.getString("Spout.LevelUp.2", new Object[] {Misc.getCapitalized(LocaleLoader.getString(Misc.getCapitalized(skillType.toString()) + ".SkillName")), profile.getSkillLevel(skillType)} ), mat); spoutPlayer.sendNotification(LocaleLoader.getString("Spout.LevelUp.1"), LocaleLoader.getString("Spout.LevelUp.2", new Object[] {Skills.localizeSkillName(skillType), profile.getSkillLevel(skillType)} ), mat);
SpoutSounds.playLevelUpNoise(spoutPlayer, plugin); SpoutSounds.playLevelUpNoise(spoutPlayer, plugin);
} }

View File

@ -58,7 +58,7 @@ public class Page {
public static void grabGuidePageForSkill(SkillType skilltype, Player player, String[] args) { public static void grabGuidePageForSkill(SkillType skilltype, Player player, String[] args) {
String skillName = skilltype.toString(); String skillName = skilltype.toString();
String capitalized = Misc.getCapitalized(skillName); String capitalized = Misc.getCapitalized(skillName);
String localized = Misc.getCapitalized(LocaleLoader.getString(capitalized + ".SkillName")); String localized = Skills.localizeSkillName(skilltype);
player.sendMessage(LocaleLoader.getString("Guides.Available", new Object[] {localized, localized.toLowerCase()} )); player.sendMessage(LocaleLoader.getString("Guides.Available", new Object[] {localized, localized.toLowerCase()} ));
if (args.length >= 1) { if (args.length >= 1) {

View File

@ -313,6 +313,10 @@ public class Skills {
return null; return null;
} }
public static String localizeSkillName(SkillType skill) {
return Misc.getCapitalized(LocaleLoader.getString(Misc.getCapitalized(skill.toString()) + ".SkillName"));
}
/** /**
* Check if the player has any combat skill permissions. * Check if the player has any combat skill permissions.
* *

View File

@ -350,6 +350,9 @@ Commands.Invite.Accepted=[[GREEN]] Gwahodd Derbyniwyd. Yr ydych wedi ymuno parti
Commands.Invite.Success=[[GREEN]]Invite sent successfully. Commands.Invite.Success=[[GREEN]]Invite sent successfully.
Commands.Leaderboards=<skill> <page> [[RED]]- Leaderboards Commands.Leaderboards=<skill> <page> [[RED]]- Leaderboards
Commands.mcgod=[[RED]]- Toggle GodMode Commands.mcgod=[[RED]]- Toggle GodMode
Commands.mcrank.Skill=[[YELLOW]]{0}[[GREEN]] - [[GOLD]]Rank [[WHITE]]#[[GREEN]]{1}
Commands.mcrank.Overall=[[YELLOW]]Overall[[GREEN]] - [[GOLD]]Rank [[WHITE]]#[[GREEN]]{0}
Commands.mmoedit=[chwaraewr] <skill> <newvalue> [[RED]] - Targed addasu Commands.mmoedit=[chwaraewr] <skill> <newvalue> [[RED]] - Targed addasu
Commands.ModDescription=[[RED]]- Read brief mod description Commands.ModDescription=[[RED]]- Read brief mod description
Commands.NoConsole=This command does not support console usage. Commands.NoConsole=This command does not support console usage.

View File

@ -393,6 +393,8 @@ Commands.Invite.Accepted=[[GREEN]]Einladung akzeptiert. Du bist der Gruppe {0} b
Commands.Invite.Success=[[GREEN]]Einladung erfolgreich versendet. Commands.Invite.Success=[[GREEN]]Einladung erfolgreich versendet.
Commands.Leaderboards=<skill> <seite> [[RED]]- Ranglisten Commands.Leaderboards=<skill> <seite> [[RED]]- Ranglisten
Commands.mcgod=[[RED]]- GodMode umschalten Commands.mcgod=[[RED]]- GodMode umschalten
Commands.mcrank.Skill=[[YELLOW]]{0}[[GREEN]] - [[GOLD]]Rank [[WHITE]]#[[GREEN]]{1}
Commands.mcrank.Overall=[[YELLOW]]Overall[[GREEN]] - [[GOLD]]Rank [[WHITE]]#[[GREEN]]{0}
Commands.mmoedit=[Spieler] <skill> <newvalue> [[RED]] - Ziel modifizieren Commands.mmoedit=[Spieler] <skill> <newvalue> [[RED]] - Ziel modifizieren
Commands.ModDescription=[[RED]]- Mod-Informationen Lesen. Commands.ModDescription=[[RED]]- Mod-Informationen Lesen.
Commands.NoConsole=Dieser Command wird nicht per Console unterst\u00FCtzt. Commands.NoConsole=Dieser Command wird nicht per Console unterst\u00FCtzt.

View File

@ -402,6 +402,8 @@ Commands.Invite.Accepted=[[GREEN]]Invite Accepted. You have joined party {0}
Commands.Invite.Success=[[GREEN]]Invite sent successfully. Commands.Invite.Success=[[GREEN]]Invite sent successfully.
Commands.Leaderboards=<skill> <page> [[RED]]- Leaderboards Commands.Leaderboards=<skill> <page> [[RED]]- Leaderboards
Commands.mcgod=[[RED]]- Toggle GodMode Commands.mcgod=[[RED]]- Toggle GodMode
Commands.mcrank.Skill=[[YELLOW]]{0}[[GREEN]] - [[GOLD]]Rank [[WHITE]]#[[GREEN]]{1}
Commands.mcrank.Overall=[[YELLOW]]Overall[[GREEN]] - [[GOLD]]Rank [[WHITE]]#[[GREEN]]{0}
Commands.mmoedit=[player] <skill> <newvalue> [[RED]] - Modify target Commands.mmoedit=[player] <skill> <newvalue> [[RED]] - Modify target
Commands.ModDescription=[[RED]]- Read brief mod description Commands.ModDescription=[[RED]]- Read brief mod description
Commands.NoConsole=This command does not support console usage. Commands.NoConsole=This command does not support console usage.
@ -435,11 +437,9 @@ Commands.SkillInfo=/<skill> [[RED]]- View detailed information about a skill
Commands.Stats.Self=YOUR STATS Commands.Stats.Self=YOUR STATS
Commands.Stats=[[RED]]- View your mcMMO stats Commands.Stats=[[RED]]- View your mcMMO stats
Commands.ToggleAbility=[[RED]]- Toggle ability activation with right click Commands.ToggleAbility=[[RED]]- Toggle ability activation with right click
mcMMO.MOTD=[[BLUE]]This server is running mcMMO {0}! \n Type [[YELLOW]]/mcmmo[[BLUE]] for help.
mcMMO.NoInvites=[[RED]]You have no invites at this time mcMMO.NoInvites=[[RED]]You have no invites at this time
mcMMO.NoPermission=[[DARK_RED]]Insufficient permissions. mcMMO.NoPermission=[[DARK_RED]]Insufficient permissions.
mcMMO.NoSkillNote=[[DARK_GRAY]]If you don't have access to a skill it will not be shown here. mcMMO.NoSkillNote=[[DARK_GRAY]]If you don't have access to a skill it will not be shown here.
mcMMO.Website=[[GREEN]]http://forums.mcmmo.info[[BLUE]] - mcMMO Website
##party ##party
Commands.Party.InParty=[[GREEN]]Party: {0} Commands.Party.InParty=[[GREEN]]Party: {0}
@ -570,3 +570,12 @@ Spout.Menu.HudButton.1=HUD Type: {0}
Spout.Menu.HudButton.2=Change your HUD style! Spout.Menu.HudButton.2=Change your HUD style!
Spout.Menu.Title=[[GOLD]]~mcMMO Menu~ Spout.Menu.Title=[[GOLD]]~mcMMO Menu~
Spout.Title={0}\n[[YELLOW]]P[[GOLD]]lvl[[WHITE]].[[GREEN]]{1} Spout.Title={0}\n[[YELLOW]]P[[GOLD]]lvl[[WHITE]].[[GREEN]]{1}
#MOTD
MOTD.Hardcore.VampireOff=[[GOLD]][mcMMO] [[DARK_RED]]Hardcore & Vampirism enabled.
MOTD.Hardcore.Stats=[[GOLD]][mcMMO] [[DARK_AQUA]]Skill Death Penalty: [[DARK_RED]]{0}%
MOTD.Hardcore.VampireOn=[[GOLD]][mcMMO] [[DARK_RED]]Hardcore enabled.
MOTD.PerksPrefix=[[RED]][mcMMO Perks]
MOTD.Vampire.Stats=[[GOLD]][mcMMO] [[DARK_AQUA]]Vampirism Stat Leech: [[DARK_RED]]{0}%
MOTD.Version=[[GOLD]][mcMMO] Running version [[DARK_AQUA]]{0}
MOTD.Website=[[GOLD]][mcMMO] [[GREEN]]{0}[[YELLOW]] - mcMMO Website

View File

@ -12,7 +12,7 @@ description: >
experience. experience.
author: nossr50 author: nossr50
authors: [NuclearW, gmcferrin, bm01, Glitchfinder, TfT_02] authors: [NuclearW, GJ, Glitchfinder, TfT_02, toothplck1]
website: http://dev.bukkit.org/server-mods/mcmmo/ website: http://dev.bukkit.org/server-mods/mcmmo/
main: com.gmail.nossr50.mcMMO main: com.gmail.nossr50.mcMMO