Change getString to use varargs

This commit is contained in:
NuclearW 2013-02-02 02:55:49 -05:00
parent c43e8f8f19
commit ebca9fc2da
53 changed files with 332 additions and 332 deletions

View File

@ -32,7 +32,7 @@ public final class ChatManager {
for (Player otherPlayer : mcMMO.p.getServer().getOnlinePlayers()) { for (Player otherPlayer : mcMMO.p.getServer().getOnlinePlayers()) {
if (Permissions.adminChat(otherPlayer) || otherPlayer.isOp()) { if (Permissions.adminChat(otherPlayer) || otherPlayer.isOp()) {
otherPlayer.sendMessage(LocaleLoader.getString("Commands.AdminChat.Prefix", new Object[] {displayName}) + adminMessage); otherPlayer.sendMessage(LocaleLoader.getString("Commands.AdminChat.Prefix", displayName) + adminMessage);
} }
} }
@ -58,7 +58,7 @@ public final class ChatManager {
String partyMessage = chatEvent.getMessage(); String partyMessage = chatEvent.getMessage();
for (Player member : party.getOnlineMembers()) { for (Player member : party.getOnlineMembers()) {
member.sendMessage(LocaleLoader.getString("Commands.Party.Chat.Prefix", new Object[] {displayName}) + partyMessage); member.sendMessage(LocaleLoader.getString("Commands.Party.Chat.Prefix", displayName) + partyMessage);
} }
displayName = ChatColor.stripColor(displayName); displayName = ChatColor.stripColor(displayName);

View File

@ -16,7 +16,7 @@ public class ACommand implements CommandExecutor {
@Override @Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
PlayerProfile profile; PlayerProfile profile;
String usage = LocaleLoader.getString("Commands.Usage.1", new Object[] {"a", "<" + LocaleLoader.getString("Commands.Usage.Message") + ">"}); String usage = LocaleLoader.getString("Commands.Usage.1", "a", "<" + LocaleLoader.getString("Commands.Usage.Message") + ">");
if (CommandHelper.noCommandPermissions(sender, "mcmmo.chat.adminchat")) { if (CommandHelper.noCommandPermissions(sender, "mcmmo.chat.adminchat")) {
return true; return true;

View File

@ -24,7 +24,7 @@ public class PCommand implements CommandExecutor {
@Override @Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
PlayerProfile profile; PlayerProfile profile;
String usage = LocaleLoader.getString("Commands.Usage.2", new Object[] {"p", "<" + LocaleLoader.getString("Commands.Usage.PartyName") + ">", "<" + LocaleLoader.getString("Commands.Usage.Message") + ">"}); String usage = LocaleLoader.getString("Commands.Usage.2", "p", "<" + LocaleLoader.getString("Commands.Usage.PartyName") + ">", "<" + LocaleLoader.getString("Commands.Usage.Message") + ">");
if (CommandHelper.noCommandPermissions(sender, "mcmmo.commands.party")) { if (CommandHelper.noCommandPermissions(sender, "mcmmo.commands.party")) {
return true; return true;

View File

@ -62,23 +62,23 @@ public final class CommandHelper {
display.sendMessage(LocaleLoader.getString("Stats.Header.Gathering")); display.sendMessage(LocaleLoader.getString("Stats.Header.Gathering"));
if (Permissions.excavation(inspect)) { if (Permissions.excavation(inspect)) {
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Excavation.Listener"), profile.getSkillLevel(SkillType.EXCAVATION), profile.getSkillXpLevel(SkillType.EXCAVATION), profile.getXpToLevel(SkillType.EXCAVATION) })); display.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Excavation.Listener"), profile.getSkillLevel(SkillType.EXCAVATION), profile.getSkillXpLevel(SkillType.EXCAVATION), profile.getXpToLevel(SkillType.EXCAVATION)));
} }
if (Permissions.fishing(inspect)) { if (Permissions.fishing(inspect)) {
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Fishing.Listener"), profile.getSkillLevel(SkillType.FISHING), profile.getSkillXpLevel(SkillType.FISHING), profile.getXpToLevel(SkillType.FISHING) })); display.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Fishing.Listener"), profile.getSkillLevel(SkillType.FISHING), profile.getSkillXpLevel(SkillType.FISHING), profile.getXpToLevel(SkillType.FISHING)));
} }
if (Permissions.herbalism(inspect)) { if (Permissions.herbalism(inspect)) {
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Herbalism.Listener"), profile.getSkillLevel(SkillType.HERBALISM), profile.getSkillXpLevel(SkillType.HERBALISM), profile.getXpToLevel(SkillType.HERBALISM) })); display.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Herbalism.Listener"), profile.getSkillLevel(SkillType.HERBALISM), profile.getSkillXpLevel(SkillType.HERBALISM), profile.getXpToLevel(SkillType.HERBALISM)));
} }
if (Permissions.mining(inspect)) { if (Permissions.mining(inspect)) {
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Mining.Listener"), profile.getSkillLevel(SkillType.MINING), profile.getSkillXpLevel(SkillType.MINING), profile.getXpToLevel(SkillType.MINING) })); display.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Mining.Listener"), profile.getSkillLevel(SkillType.MINING), profile.getSkillXpLevel(SkillType.MINING), profile.getXpToLevel(SkillType.MINING)));
} }
if (Permissions.woodcutting(inspect)) { if (Permissions.woodcutting(inspect)) {
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Woodcutting.Listener"), profile.getSkillLevel(SkillType.WOODCUTTING), profile.getSkillXpLevel(SkillType.WOODCUTTING), profile.getXpToLevel(SkillType.WOODCUTTING) })); display.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Woodcutting.Listener"), profile.getSkillLevel(SkillType.WOODCUTTING), profile.getSkillXpLevel(SkillType.WOODCUTTING), profile.getXpToLevel(SkillType.WOODCUTTING)));
} }
} }
} }
@ -99,23 +99,23 @@ public final class CommandHelper {
display.sendMessage(LocaleLoader.getString("Stats.Header.Combat")); display.sendMessage(LocaleLoader.getString("Stats.Header.Combat"));
if (Permissions.axes(inspect)) { if (Permissions.axes(inspect)) {
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Axes.Listener"), profile.getSkillLevel(SkillType.AXES), profile.getSkillXpLevel(SkillType.AXES), profile.getXpToLevel(SkillType.AXES) })); display.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Axes.Listener"), profile.getSkillLevel(SkillType.AXES), profile.getSkillXpLevel(SkillType.AXES), profile.getXpToLevel(SkillType.AXES)));
} }
if (Permissions.archery(inspect)) { if (Permissions.archery(inspect)) {
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Archery.Listener"), profile.getSkillLevel(SkillType.ARCHERY), profile.getSkillXpLevel(SkillType.ARCHERY), profile.getXpToLevel(SkillType.ARCHERY) })); display.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Archery.Listener"), profile.getSkillLevel(SkillType.ARCHERY), profile.getSkillXpLevel(SkillType.ARCHERY), profile.getXpToLevel(SkillType.ARCHERY)));
} }
if (Permissions.swords(inspect)) { if (Permissions.swords(inspect)) {
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Swords.Listener"), profile.getSkillLevel(SkillType.SWORDS), profile.getSkillXpLevel(SkillType.SWORDS), profile.getXpToLevel(SkillType.SWORDS) })); display.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Swords.Listener"), profile.getSkillLevel(SkillType.SWORDS), profile.getSkillXpLevel(SkillType.SWORDS), profile.getXpToLevel(SkillType.SWORDS)));
} }
if (Permissions.taming(inspect)) { if (Permissions.taming(inspect)) {
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Taming.Listener"), profile.getSkillLevel(SkillType.TAMING), profile.getSkillXpLevel(SkillType.TAMING), profile.getXpToLevel(SkillType.TAMING) })); display.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Taming.Listener"), profile.getSkillLevel(SkillType.TAMING), profile.getSkillXpLevel(SkillType.TAMING), profile.getXpToLevel(SkillType.TAMING)));
} }
if (Permissions.unarmed(inspect)) { if (Permissions.unarmed(inspect)) {
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Unarmed.Listener"), profile.getSkillLevel(SkillType.UNARMED), profile.getSkillXpLevel(SkillType.UNARMED), profile.getXpToLevel(SkillType.UNARMED) })); display.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Unarmed.Listener"), profile.getSkillLevel(SkillType.UNARMED), profile.getSkillXpLevel(SkillType.UNARMED), profile.getXpToLevel(SkillType.UNARMED)));
} }
} }
} }
@ -136,11 +136,11 @@ public final class CommandHelper {
display.sendMessage(LocaleLoader.getString("Stats.Header.Misc")); display.sendMessage(LocaleLoader.getString("Stats.Header.Misc"));
if (Permissions.acrobatics(inspect)) { if (Permissions.acrobatics(inspect)) {
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Acrobatics.Listener"), profile.getSkillLevel(SkillType.ACROBATICS), profile.getSkillXpLevel(SkillType.ACROBATICS), profile.getXpToLevel(SkillType.ACROBATICS) })); display.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Acrobatics.Listener"), profile.getSkillLevel(SkillType.ACROBATICS), profile.getSkillXpLevel(SkillType.ACROBATICS), profile.getXpToLevel(SkillType.ACROBATICS)));
} }
if (Permissions.repair(inspect)) { if (Permissions.repair(inspect)) {
display.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Repair.Listener"), profile.getSkillLevel(SkillType.REPAIR), profile.getSkillXpLevel(SkillType.REPAIR), profile.getXpToLevel(SkillType.REPAIR) })); display.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Repair.Listener"), profile.getSkillLevel(SkillType.REPAIR), profile.getSkillXpLevel(SkillType.REPAIR), profile.getXpToLevel(SkillType.REPAIR)));
} }
} }
} }

View File

@ -50,7 +50,7 @@ public final class CommandRegistrationHelper {
} }
command.setAliases(aliasList); command.setAliases(aliasList);
command.setDescription(LocaleLoader.getString("Commands.Description.Skill", new Object[] { Misc.getCapitalized(localizedName) })); command.setDescription(LocaleLoader.getString("Commands.Description.Skill", Misc.getCapitalized(localizedName)));
command.setPermission("mcmmo.skills." + commandName); command.setPermission("mcmmo.skills." + commandName);
command.setPermissionMessage(permissionsMessage); command.setPermissionMessage(permissionsMessage);
@ -119,7 +119,7 @@ public final class CommandRegistrationHelper {
command.setDescription(LocaleLoader.getString("Commands.Description.addlevels")); command.setDescription(LocaleLoader.getString("Commands.Description.addlevels"));
command.setPermission("mcmmo.commands.addlevels"); command.setPermission("mcmmo.commands.addlevels");
command.setPermissionMessage(permissionsMessage); command.setPermissionMessage(permissionsMessage);
command.setUsage(LocaleLoader.getString("Commands.Usage.3", new Object[] {"addlevels", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]", "<" + LocaleLoader.getString("Commands.Usage.Skill") + ">", "<" + LocaleLoader.getString("Commands.Usage.Level") + ">" })); command.setUsage(LocaleLoader.getString("Commands.Usage.3", "addlevels", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]", "<" + LocaleLoader.getString("Commands.Usage.Skill") + ">", "<" + LocaleLoader.getString("Commands.Usage.Level") + ">"));
command.setExecutor(new AddlevelsCommand()); command.setExecutor(new AddlevelsCommand());
} }
@ -128,7 +128,7 @@ public final class CommandRegistrationHelper {
command.setDescription(LocaleLoader.getString("Commands.Description.addxp")); command.setDescription(LocaleLoader.getString("Commands.Description.addxp"));
command.setPermission("mcmmo.commands.addxp"); command.setPermission("mcmmo.commands.addxp");
command.setPermissionMessage(permissionsMessage); command.setPermissionMessage(permissionsMessage);
command.setUsage(LocaleLoader.getString("Commands.Usage.3", new Object[] {"addxp", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]", "<" + LocaleLoader.getString("Commands.Usage.Skill") + ">", "<" + LocaleLoader.getString("Commands.Usage.XP") + ">" })); command.setUsage(LocaleLoader.getString("Commands.Usage.3", "addxp", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]", "<" + LocaleLoader.getString("Commands.Usage.Skill") + ">", "<" + LocaleLoader.getString("Commands.Usage.XP") + ">"));
command.setExecutor(new AddxpCommand()); command.setExecutor(new AddxpCommand());
} }
} }

View File

@ -41,10 +41,10 @@ public class AddlevelsCommand implements CommandExecutor{
profile = Users.getPlayer((Player) sender).getProfile(); profile = Users.getPlayer((Player) sender).getProfile();
if (skill.equals(SkillType.ALL)) { if (skill.equals(SkillType.ALL)) {
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.1", new Object[] {levels})); sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.1", levels));
} }
else { else {
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.1", new Object[] {levels, Misc.getCapitalized(skill.toString())})); sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.1", levels, Misc.getCapitalized(skill.toString())));
} }
profile.addLevels(skill, levels); profile.addLevels(skill, levels);
@ -90,19 +90,19 @@ public class AddlevelsCommand implements CommandExecutor{
// TODO: Is it even possible for the player to be offline at this point? // TODO: Is it even possible for the player to be offline at this point?
if (player.isOnline()) { if (player.isOnline()) {
if (skill.equals(SkillType.ALL)) { if (skill.equals(SkillType.ALL)) {
player.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.1", new Object[] {levels})); player.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.1", levels));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.1", new Object[] {levels, Misc.getCapitalized(skill.toString())})); player.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.1", levels, Misc.getCapitalized(skill.toString())));
} }
} }
} }
if (skill.equals(SkillType.ALL)) { if (skill.equals(SkillType.ALL)) {
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", new Object[] {args[0]})); sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", args[0]));
} }
else { else {
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.2", new Object[] {Misc.getCapitalized(skill.toString()), args[0]})); sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.2", Misc.getCapitalized(skill.toString()), args[0]));
} }
return true; return true;

View File

@ -49,11 +49,11 @@ public class AddxpCommand implements CommandExecutor {
if (skill.equals(SkillType.ALL)) { if (skill.equals(SkillType.ALL)) {
SkillTools.xpCheckAll(modifiedPlayer, profile); SkillTools.xpCheckAll(modifiedPlayer, profile);
sender.sendMessage(LocaleLoader.getString("Commands.addxp.AwardAll", new Object[] { xp })); sender.sendMessage(LocaleLoader.getString("Commands.addxp.AwardAll", xp));
} }
else { else {
SkillTools.xpCheckSkill(skill, modifiedPlayer, profile); SkillTools.xpCheckSkill(skill, modifiedPlayer, profile);
sender.sendMessage(LocaleLoader.getString("Commands.addxp.AwardSkill", new Object[] { xp, Misc.getCapitalized(skill.toString()) })); sender.sendMessage(LocaleLoader.getString("Commands.addxp.AwardSkill", xp, Misc.getCapitalized(skill.toString())));
} }
return true; return true;
@ -90,13 +90,13 @@ public class AddxpCommand implements CommandExecutor {
mcMMOPlayer.addXpOverride(skill, xp); mcMMOPlayer.addXpOverride(skill, xp);
if (skill.equals(SkillType.ALL)) { if (skill.equals(SkillType.ALL)) {
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", new Object[] { playerName })); sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", playerName));
modifiedPlayer.sendMessage(LocaleLoader.getString("Commands.addxp.AwardAll", new Object[] { xp })); modifiedPlayer.sendMessage(LocaleLoader.getString("Commands.addxp.AwardAll", xp));
SkillTools.xpCheckAll(modifiedPlayer, profile); SkillTools.xpCheckAll(modifiedPlayer, profile);
} }
else { else {
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.2", new Object[] { Misc.getCapitalized(skill.toString()), playerName })); sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.2", Misc.getCapitalized(skill.toString()), playerName));
modifiedPlayer.sendMessage(LocaleLoader.getString("Commands.addxp.AwardSkill", new Object[] { xp, Misc.getCapitalized(skill.toString()) })); modifiedPlayer.sendMessage(LocaleLoader.getString("Commands.addxp.AwardSkill", xp, Misc.getCapitalized(skill.toString())));
SkillTools.xpCheckSkill(skill, modifiedPlayer, profile); SkillTools.xpCheckSkill(skill, modifiedPlayer, profile);
} }

View File

@ -17,7 +17,7 @@ public class McrefreshCommand implements CommandExecutor {
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
OfflinePlayer player; OfflinePlayer player;
PlayerProfile profile; PlayerProfile profile;
String usage = LocaleLoader.getString("Commands.Usage.1", new Object[] {"mcrefresh", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]"}); String usage = LocaleLoader.getString("Commands.Usage.1", "mcrefresh", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]");
if (CommandHelper.noCommandPermissions(sender, "mcmmo.tools.mcrefresh")) { if (CommandHelper.noCommandPermissions(sender, "mcmmo.tools.mcrefresh")) {
return true; return true;
@ -50,7 +50,7 @@ public class McrefreshCommand implements CommandExecutor {
return true; return true;
} }
sender.sendMessage(LocaleLoader.getString("Commands.mcrefresh.Success", new Object[] {playerName})); sender.sendMessage(LocaleLoader.getString("Commands.mcrefresh.Success", playerName));
break; break;

View File

@ -21,7 +21,7 @@ public class MmoeditCommand implements CommandExecutor {
int newValue; int newValue;
SkillType skill; SkillType skill;
String skillName; String skillName;
String usage = LocaleLoader.getString("Commands.Usage.3", new Object[] {"mmoedit", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]", "<" + LocaleLoader.getString("Commands.Usage.Skill") + ">", "<" + LocaleLoader.getString("Commands.Usage.Level") + ">" }); String usage = LocaleLoader.getString("Commands.Usage.3", "mmoedit", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]", "<" + LocaleLoader.getString("Commands.Usage.Skill") + ">", "<" + LocaleLoader.getString("Commands.Usage.Level") + ">");
switch (args.length) { switch (args.length) {
case 2: case 2:
@ -42,10 +42,10 @@ public class MmoeditCommand implements CommandExecutor {
profile = Users.getProfile(player); profile = Users.getProfile(player);
if (skill.equals(SkillType.ALL)) { if (skill.equals(SkillType.ALL)) {
sender.sendMessage(LocaleLoader.getString("Commands.mmoedit.AllSkills.1", new Object[] { newValue })); sender.sendMessage(LocaleLoader.getString("Commands.mmoedit.AllSkills.1", newValue));
} }
else { else {
sender.sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.1", new Object[] { Misc.getCapitalized(skill.toString()), newValue })); sender.sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.1", Misc.getCapitalized(skill.toString()), newValue));
} }
profile.modifySkill(skill, newValue); profile.modifySkill(skill, newValue);
@ -90,14 +90,14 @@ public class MmoeditCommand implements CommandExecutor {
profile.modifySkill(skill, newValue); profile.modifySkill(skill, newValue);
if (skill == SkillType.ALL) { if (skill == SkillType.ALL) {
mcmmoPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.mmoedit.AllSkills.1", new Object[] { newValue })); mcmmoPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.mmoedit.AllSkills.1", newValue));
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", new Object[] { args[0] })); sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", args[0]));
} }
else { else {
skillName = Misc.getCapitalized(skill.toString()); skillName = Misc.getCapitalized(skill.toString());
mcmmoPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.1", new Object[] { skillName, newValue })); mcmmoPlayer.getPlayer().sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.1", skillName, newValue));
sender.sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.2", new Object[] { skillName, args[0] })); sender.sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.2", skillName, args[0]));
} }
} }
else { else {
@ -112,10 +112,10 @@ public class MmoeditCommand implements CommandExecutor {
profile.save(); profile.save();
if (skill == SkillType.ALL) { if (skill == SkillType.ALL) {
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", new Object[] { args[0] })); sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", args[0]));
} }
else { else {
sender.sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.2", new Object[] { Misc.getCapitalized(skill.toString()), args[0] })); sender.sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.2", Misc.getCapitalized(skill.toString()), args[0]));
} }
} }
return true; return true;

View File

@ -21,7 +21,7 @@ public class SkillResetCommand implements CommandExecutor {
OfflinePlayer modifiedPlayer; OfflinePlayer modifiedPlayer;
PlayerProfile profile; PlayerProfile profile;
SkillType skill; SkillType skill;
String usage = LocaleLoader.getString("Commands.Usage.3", new Object[] {"skillreset", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]", "<" + LocaleLoader.getString("Commands.Usage.Skill") + ">"}); String usage = LocaleLoader.getString("Commands.Usage.3", "skillreset", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]", "<" + LocaleLoader.getString("Commands.Usage.Skill") + ">");
switch (args.length) { switch (args.length) {
case 1: case 1:
@ -45,7 +45,7 @@ public class SkillResetCommand implements CommandExecutor {
sender.sendMessage(LocaleLoader.getString("Commands.Reset.All")); sender.sendMessage(LocaleLoader.getString("Commands.Reset.All"));
} }
else { else {
sender.sendMessage(LocaleLoader.getString("Commands.Reset.Single", new Object[] { Misc.getCapitalized(skill.toString()) })); sender.sendMessage(LocaleLoader.getString("Commands.Reset.Single", Misc.getCapitalized(skill.toString())));
} }
} }
else { else {
@ -82,11 +82,11 @@ public class SkillResetCommand implements CommandExecutor {
((Player)modifiedPlayer).sendMessage(LocaleLoader.getString("Commands.Reset.All")); ((Player)modifiedPlayer).sendMessage(LocaleLoader.getString("Commands.Reset.All"));
} }
else { else {
((Player)modifiedPlayer).sendMessage(LocaleLoader.getString("Commands.Reset.Single", new Object[] { Misc.getCapitalized(skill.toString()) })); ((Player)modifiedPlayer).sendMessage(LocaleLoader.getString("Commands.Reset.Single", Misc.getCapitalized(skill.toString())));
} }
} }
sender.sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.2", new Object[] { Misc.getCapitalized(skill.toString()), args[0] })); sender.sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.2", Misc.getCapitalized(skill.toString()), args[0]));
return true; return true;
default: default:

View File

@ -72,11 +72,11 @@ public class XprateCommand implements CommandExecutor {
if (xpEventEnabled) { if (xpEventEnabled) {
for (Player x : mcMMO.p.getServer().getOnlinePlayers()) { for (Player x : mcMMO.p.getServer().getOnlinePlayers()) {
x.sendMessage(LocaleLoader.getString("Commands.xprate.started.0")); x.sendMessage(LocaleLoader.getString("Commands.xprate.started.0"));
x.sendMessage(LocaleLoader.getString("Commands.xprate.started.1", new Object[] {newRate})); x.sendMessage(LocaleLoader.getString("Commands.xprate.started.1", newRate));
} }
} }
else { else {
sender.sendMessage(LocaleLoader.getString("Commands.xprate.modified", new Object[] {newRate})); sender.sendMessage(LocaleLoader.getString("Commands.xprate.modified", newRate));
} }
} }
else { else {

View File

@ -17,7 +17,7 @@ import com.gmail.nossr50.util.Users;
public class InspectCommand implements CommandExecutor { public class InspectCommand implements CommandExecutor {
@Override @Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
String usage = LocaleLoader.getString("Commands.Usage.1", new Object[] {"inspect", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">"}); String usage = LocaleLoader.getString("Commands.Usage.1", "inspect", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">");
if (CommandHelper.noCommandPermissions(sender, "mcmmo.commands.inspect")) { if (CommandHelper.noCommandPermissions(sender, "mcmmo.commands.inspect")) {
return true; return true;
@ -37,11 +37,11 @@ public class InspectCommand implements CommandExecutor {
PlayerProfile profile = mcmmoPlayer.getProfile(); PlayerProfile profile = mcmmoPlayer.getProfile();
sender.sendMessage(LocaleLoader.getString("Inspect.Stats", new Object[] { target.getName() })); sender.sendMessage(LocaleLoader.getString("Inspect.Stats", target.getName()));
CommandHelper.printGatheringSkills(target, profile, sender); CommandHelper.printGatheringSkills(target, profile, sender);
CommandHelper.printCombatSkills(target, profile, sender); CommandHelper.printCombatSkills(target, profile, sender);
CommandHelper.printMiscSkills(target, profile, sender); CommandHelper.printMiscSkills(target, profile, sender);
sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel", new Object[] { mcmmoPlayer.getPowerLevel() })); sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel", mcmmoPlayer.getPowerLevel()));
return true; return true;
} }
@ -58,25 +58,25 @@ public class InspectCommand implements CommandExecutor {
return true; return true;
} }
sender.sendMessage(LocaleLoader.getString("Inspect.OfflineStats", new Object[] { args[0] })); sender.sendMessage(LocaleLoader.getString("Inspect.OfflineStats", args[0]));
sender.sendMessage(LocaleLoader.getString("Stats.Header.Gathering")); sender.sendMessage(LocaleLoader.getString("Stats.Header.Gathering"));
sender.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Excavation.Listener"), profile.getSkillLevel(SkillType.EXCAVATION), profile.getSkillXpLevel(SkillType.EXCAVATION), profile.getXpToLevel(SkillType.EXCAVATION) })); sender.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Excavation.Listener"), profile.getSkillLevel(SkillType.EXCAVATION), profile.getSkillXpLevel(SkillType.EXCAVATION), profile.getXpToLevel(SkillType.EXCAVATION)));
sender.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Fishing.Listener"), profile.getSkillLevel(SkillType.FISHING), profile.getSkillXpLevel(SkillType.FISHING), profile.getXpToLevel(SkillType.FISHING) })); sender.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Fishing.Listener"), profile.getSkillLevel(SkillType.FISHING), profile.getSkillXpLevel(SkillType.FISHING), profile.getXpToLevel(SkillType.FISHING)));
sender.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Herbalism.Listener"), profile.getSkillLevel(SkillType.HERBALISM), profile.getSkillXpLevel(SkillType.HERBALISM), profile.getXpToLevel(SkillType.HERBALISM) })); sender.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Herbalism.Listener"), profile.getSkillLevel(SkillType.HERBALISM), profile.getSkillXpLevel(SkillType.HERBALISM), profile.getXpToLevel(SkillType.HERBALISM)));
sender.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Mining.Listener"), profile.getSkillLevel(SkillType.MINING), profile.getSkillXpLevel(SkillType.MINING), profile.getXpToLevel(SkillType.MINING) })); sender.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Mining.Listener"), profile.getSkillLevel(SkillType.MINING), profile.getSkillXpLevel(SkillType.MINING), profile.getXpToLevel(SkillType.MINING)));
sender.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Woodcutting.Listener"), profile.getSkillLevel(SkillType.WOODCUTTING), profile.getSkillXpLevel(SkillType.WOODCUTTING), profile.getXpToLevel(SkillType.WOODCUTTING) })); sender.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Woodcutting.Listener"), profile.getSkillLevel(SkillType.WOODCUTTING), profile.getSkillXpLevel(SkillType.WOODCUTTING), profile.getXpToLevel(SkillType.WOODCUTTING)));
sender.sendMessage(LocaleLoader.getString("Stats.Header.Combat")); sender.sendMessage(LocaleLoader.getString("Stats.Header.Combat"));
sender.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Axes.Listener"), profile.getSkillLevel(SkillType.AXES), profile.getSkillXpLevel(SkillType.AXES), profile.getXpToLevel(SkillType.AXES) })); sender.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Axes.Listener"), profile.getSkillLevel(SkillType.AXES), profile.getSkillXpLevel(SkillType.AXES), profile.getXpToLevel(SkillType.AXES)));
sender.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Archery.Listener"), profile.getSkillLevel(SkillType.ARCHERY), profile.getSkillXpLevel(SkillType.ARCHERY), profile.getXpToLevel(SkillType.ARCHERY) })); sender.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Archery.Listener"), profile.getSkillLevel(SkillType.ARCHERY), profile.getSkillXpLevel(SkillType.ARCHERY), profile.getXpToLevel(SkillType.ARCHERY)));
sender.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Swords.Listener"), profile.getSkillLevel(SkillType.SWORDS), profile.getSkillXpLevel(SkillType.SWORDS), profile.getXpToLevel(SkillType.SWORDS) })); sender.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Swords.Listener"), profile.getSkillLevel(SkillType.SWORDS), profile.getSkillXpLevel(SkillType.SWORDS), profile.getXpToLevel(SkillType.SWORDS)));
sender.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Taming.Listener"), profile.getSkillLevel(SkillType.TAMING), profile.getSkillXpLevel(SkillType.TAMING), profile.getXpToLevel(SkillType.TAMING) })); sender.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Taming.Listener"), profile.getSkillLevel(SkillType.TAMING), profile.getSkillXpLevel(SkillType.TAMING), profile.getXpToLevel(SkillType.TAMING)));
sender.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Unarmed.Listener"), profile.getSkillLevel(SkillType.UNARMED), profile.getSkillXpLevel(SkillType.UNARMED), profile.getXpToLevel(SkillType.UNARMED) })); sender.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Unarmed.Listener"), profile.getSkillLevel(SkillType.UNARMED), profile.getSkillXpLevel(SkillType.UNARMED), profile.getXpToLevel(SkillType.UNARMED)));
sender.sendMessage(LocaleLoader.getString("Stats.Header.Misc")); sender.sendMessage(LocaleLoader.getString("Stats.Header.Misc"));
sender.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Acrobatics.Listener"), profile.getSkillLevel(SkillType.ACROBATICS), profile.getSkillXpLevel(SkillType.ACROBATICS), profile.getXpToLevel(SkillType.ACROBATICS) })); sender.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Acrobatics.Listener"), profile.getSkillLevel(SkillType.ACROBATICS), profile.getSkillXpLevel(SkillType.ACROBATICS), profile.getXpToLevel(SkillType.ACROBATICS)));
sender.sendMessage(LocaleLoader.getString("Skills.Stats", new Object[] { LocaleLoader.getString("Repair.Listener"), profile.getSkillLevel(SkillType.REPAIR), profile.getSkillXpLevel(SkillType.REPAIR), profile.getXpToLevel(SkillType.REPAIR) })); sender.sendMessage(LocaleLoader.getString("Skills.Stats", LocaleLoader.getString("Repair.Listener"), profile.getSkillLevel(SkillType.REPAIR), profile.getSkillXpLevel(SkillType.REPAIR), profile.getXpToLevel(SkillType.REPAIR)));
return true; return true;

View File

@ -16,7 +16,7 @@ public class McabilityCommand implements CommandExecutor {
@Override @Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
PlayerProfile profile; PlayerProfile profile;
String usage = LocaleLoader.getString("Commands.Usage.1", new Object[] {"mcability", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">"}); String usage = LocaleLoader.getString("Commands.Usage.1", "mcability", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">");
switch (args.length) { switch (args.length) {
case 0: case 0:

View File

@ -29,7 +29,7 @@ public class McmmoCommand implements CommandExecutor {
sender.sendMessage(LocaleLoader.getString("MOTD.Donate")); sender.sendMessage(LocaleLoader.getString("MOTD.Donate"));
sender.sendMessage(ChatColor.GOLD + " - " + ChatColor.GREEN + "gjmcferrin@gmail.com" + ChatColor.GOLD + " Paypal"); sender.sendMessage(ChatColor.GOLD + " - " + ChatColor.GREEN + "gjmcferrin@gmail.com" + ChatColor.GOLD + " Paypal");
} }
sender.sendMessage(LocaleLoader.getString("MOTD.Version", new Object[] {mcMMO.p.getDescription().getVersion()})); sender.sendMessage(LocaleLoader.getString("MOTD.Version", mcMMO.p.getDescription().getVersion()));
Anniversary.anniversaryCheck(sender); Anniversary.anniversaryCheck(sender);
return true; return true;

View File

@ -54,7 +54,7 @@ public class McrankCommand implements CommandExecutor {
public void flatfileDisplay(CommandSender sender, String playerName) { public void flatfileDisplay(CommandSender sender, String playerName) {
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Heading")); sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Heading"));
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Player", new Object[] {playerName})); sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Player", playerName));
for (SkillType skillType : SkillType.values()) { for (SkillType skillType : SkillType.values()) {
int[] rankInts = Leaderboard.getPlayerRank(playerName, skillType); int[] rankInts = Leaderboard.getPlayerRank(playerName, skillType);
if (skillType.isChildSkill()) { if (skillType.isChildSkill()) {
@ -66,10 +66,10 @@ public class McrankCommand implements CommandExecutor {
} }
if (rankInts[1] == 0) { if (rankInts[1] == 0) {
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Skill", new Object[] {SkillTools.localizeSkillName(skillType), LocaleLoader.getString("Commands.mcrank.Unranked")} )); //Don't bother showing ranking for players without skills sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Skill", SkillTools.localizeSkillName(skillType), LocaleLoader.getString("Commands.mcrank.Unranked"))); //Don't bother showing ranking for players without skills
} }
else { else {
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Skill", new Object[] {SkillTools.localizeSkillName(skillType), String.valueOf(rankInts[0])} )); sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Skill", SkillTools.localizeSkillName(skillType), String.valueOf(rankInts[0])));
} }
} }
@ -77,10 +77,10 @@ public class McrankCommand implements CommandExecutor {
int[] rankInts = Leaderboard.getPlayerRank(playerName, SkillType.ALL); int[] rankInts = Leaderboard.getPlayerRank(playerName, SkillType.ALL);
if (rankInts[1] == 0) { if (rankInts[1] == 0) {
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Overalll", new Object[] {LocaleLoader.getString("Commands.mcrank.Unranked")} )); //Don't bother showing ranking for players without skills sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Overalll", LocaleLoader.getString("Commands.mcrank.Unranked"))); //Don't bother showing ranking for players without skills
} }
else { else {
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Overall", new Object[] {String.valueOf(rankInts[0])} )); sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Overall", String.valueOf(rankInts[0])));
} }
} }

View File

@ -35,10 +35,10 @@ public class McstatsCommand implements CommandExecutor {
int powerLevelCap = Config.getInstance().getPowerLevelCap(); int powerLevelCap = Config.getInstance().getPowerLevelCap();
if (powerLevelCap > 0) { if (powerLevelCap > 0) {
player.sendMessage(LocaleLoader.getString("Commands.PowerLevel.Capped", new Object[] { String.valueOf(Users.getPlayer(player).getPowerLevel()), String.valueOf(powerLevelCap) })); player.sendMessage(LocaleLoader.getString("Commands.PowerLevel.Capped", String.valueOf(Users.getPlayer(player).getPowerLevel()), String.valueOf(powerLevelCap)));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Commands.PowerLevel", new Object[] { String.valueOf(Users.getPlayer(player).getPowerLevel()) })); player.sendMessage(LocaleLoader.getString("Commands.PowerLevel", String.valueOf(Users.getPlayer(player).getPowerLevel())));
} }
return true; return true;

View File

@ -19,7 +19,7 @@ import com.gmail.nossr50.util.Misc;
public class MctopCommand implements CommandExecutor { public class MctopCommand implements CommandExecutor {
@Override @Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
String usage = LocaleLoader.getString("Commands.Usage.2", new Object[] {"mctop", "[" + LocaleLoader.getString("Commands.Usage.Skill") + "]", "[" + LocaleLoader.getString("Commands.Usage.Page") + "]"}); String usage = LocaleLoader.getString("Commands.Usage.2", "mctop", "[" + LocaleLoader.getString("Commands.Usage.Skill") + "]", "[" + LocaleLoader.getString("Commands.Usage.Page") + "]");
if (!Config.getInstance().getUseMySQL()) { if (!Config.getInstance().getUseMySQL()) {
@ -124,7 +124,7 @@ public class MctopCommand implements CommandExecutor {
sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel.Leaderboard")); sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel.Leaderboard"));
} }
else { else {
sender.sendMessage(LocaleLoader.getString("Commands.Skill.Leaderboard", new Object[] { Misc.getCapitalized(skill) })); sender.sendMessage(LocaleLoader.getString("Commands.Skill.Leaderboard", Misc.getCapitalized(skill)));
} }
int n = (page * 10) - 9; // Position int n = (page * 10) - 9; // Position
@ -155,7 +155,7 @@ public class MctopCommand implements CommandExecutor {
sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel.Leaderboard")); sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel.Leaderboard"));
} }
else { else {
sender.sendMessage(LocaleLoader.getString("Commands.Skill.Leaderboard", new Object[] { Misc.getCapitalized(query) })); sender.sendMessage(LocaleLoader.getString("Commands.Skill.Leaderboard", Misc.getCapitalized(query)));
} }
int place = (page * 10) - 9; int place = (page * 10) - 9;
for (int i = 1; i <= 10; i++) { for (int i = 1; i <= 10; i++) {

View File

@ -21,7 +21,7 @@ public class McremoveCommand implements CommandExecutor {
String playerName; String playerName;
String tablePrefix = Config.getInstance().getMySQLTablePrefix(); String tablePrefix = Config.getInstance().getMySQLTablePrefix();
//String databaseName = Config.getInstance().getMySQLDatabaseName(); //String databaseName = Config.getInstance().getMySQLDatabaseName();
String usage = LocaleLoader.getString("Commands.Usage.1", new Object[] {"mcremove", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">"}); String usage = LocaleLoader.getString("Commands.Usage.1", "mcremove", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">");
String success; String success;
if (CommandHelper.noCommandPermissions(sender, "mcmmo.tools.mcremove")) { if (CommandHelper.noCommandPermissions(sender, "mcmmo.tools.mcremove")) {
@ -31,7 +31,7 @@ public class McremoveCommand implements CommandExecutor {
switch (args.length) { switch (args.length) {
case 1: case 1:
playerName = args[0]; playerName = args[0];
success = LocaleLoader.getString("Commands.mcremove.Success", new Object[] {playerName}); success = LocaleLoader.getString("Commands.mcremove.Success", playerName);
break; break;
default: default:

View File

@ -157,7 +157,7 @@ public class PlayerListener implements Listener {
} }
if (plugin.isXPEventEnabled()) { if (plugin.isXPEventEnabled()) {
player.sendMessage(LocaleLoader.getString("XPRate.Event", new Object[] {Config.getInstance().getExperienceGainsGlobalMultiplier()})); player.sendMessage(LocaleLoader.getString("XPRate.Event", Config.getInstance().getExperienceGainsGlobalMultiplier()));
} }
} }

View File

@ -16,7 +16,7 @@ public final class LocaleLoader {
private LocaleLoader() {}; private LocaleLoader() {};
public static String getString(String key) { public static String getString(String key) {
return getString(key, null); return getString(key, (Object[]) null);
} }
/** /**
@ -26,7 +26,7 @@ public final class LocaleLoader {
* @param messageArguments Any arguments to be added to the string * @param messageArguments Any arguments to be added to the string
* @return The properly formatted locale string * @return The properly formatted locale string
*/ */
public static String getString(String key, Object[] messageArguments) { public static String getString(String key, Object ... messageArguments) {
try { try {
if (RESOURCE_BUNDLE == null) { if (RESOURCE_BUNDLE == null) {
Locale.setDefault(new Locale("en", "US")); Locale.setDefault(new Locale("en", "US"));

View File

@ -72,7 +72,7 @@ public final class PartyManager {
private static void informPartyMembersJoin(String playerName, Party party) { private static void informPartyMembersJoin(String playerName, Party party) {
for (Player member : party.getOnlineMembers()) { for (Player member : party.getOnlineMembers()) {
if (!member.getName().equals(playerName)) { if (!member.getName().equals(playerName)) {
member.sendMessage(LocaleLoader.getString("Party.InformedOnJoin", new Object[] {playerName})); member.sendMessage(LocaleLoader.getString("Party.InformedOnJoin", playerName));
} }
} }
} }
@ -86,7 +86,7 @@ public final class PartyManager {
private static void informPartyMembersQuit(String playerName, Party party) { private static void informPartyMembersQuit(String playerName, Party party) {
for (Player member : party.getOnlineMembers()) { for (Player member : party.getOnlineMembers()) {
if (!member.getName().equals(playerName)) { if (!member.getName().equals(playerName)) {
member.sendMessage(LocaleLoader.getString("Party.InformedOnQuit", new Object[] {playerName})); member.sendMessage(LocaleLoader.getString("Party.InformedOnQuit", playerName));
} }
} }
} }
@ -250,7 +250,7 @@ public final class PartyManager {
if (password != null) { if (password != null) {
party.setPassword(password); party.setPassword(password);
party.setLocked(true); party.setLocked(true);
player.sendMessage(LocaleLoader.getString("Party.Password.Set", new Object[] {password})); player.sendMessage(LocaleLoader.getString("Party.Password.Set", password));
} }
parties.add(party); parties.add(party);
} }
@ -259,7 +259,7 @@ public final class PartyManager {
return; return;
} }
player.sendMessage(LocaleLoader.getString("Commands.Party.Create", new Object[] {party.getName()})); player.sendMessage(LocaleLoader.getString("Commands.Party.Create", party.getName()));
addToParty(player.getName(), playerProfile, party); addToParty(player.getName(), playerProfile, party);
} }
@ -293,7 +293,7 @@ public final class PartyManager {
return; return;
} }
player.sendMessage(LocaleLoader.getString("Commands.Party.Join", new Object[]{party.getName()})); player.sendMessage(LocaleLoader.getString("Commands.Party.Join", party.getName()));
addToParty(player.getName(), playerProfile, party); addToParty(player.getName(), playerProfile, party);
} }
@ -313,7 +313,7 @@ public final class PartyManager {
if (partyPassword != null) { if (partyPassword != null) {
if (password == null) { if (password == null) {
player.sendMessage(LocaleLoader.getString("Party.Password.None")); player.sendMessage(LocaleLoader.getString("Party.Password.None"));
player.sendMessage(LocaleLoader.getString("Commands.Usage.3", new Object[] {"party", "join", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">", "<" + LocaleLoader.getString("Commands.Usage.Password") + ">"})); player.sendMessage(LocaleLoader.getString("Commands.Usage.3", "party", "join", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">", "<" + LocaleLoader.getString("Commands.Usage.Password") + ">"));
return false; return false;
} }
else if (!password.equals(partyPassword)) { else if (!password.equals(partyPassword)) {
@ -343,7 +343,7 @@ public final class PartyManager {
parties.add(invite); parties.add(invite);
} }
player.sendMessage(LocaleLoader.getString("Commands.Invite.Accepted", new Object[]{invite.getName()})); player.sendMessage(LocaleLoader.getString("Commands.Invite.Accepted", invite.getName()));
playerProfile.removeInvite(); playerProfile.removeInvite();
addToParty(player.getName(), playerProfile, invite); addToParty(player.getName(), playerProfile, invite);
} }
@ -394,7 +394,7 @@ public final class PartyManager {
member.sendMessage(LocaleLoader.getString("Party.Owner.NotLeader")); member.sendMessage(LocaleLoader.getString("Party.Owner.NotLeader"));
} }
else { else {
member.sendMessage(LocaleLoader.getString("Party.Owner.New", new Object[] {playerName})); member.sendMessage(LocaleLoader.getString("Party.Owner.New", playerName));
} }
} }

View File

@ -138,17 +138,17 @@ public class PartyCommand implements CommandExecutor {
} }
player.sendMessage(LocaleLoader.getString("Commands.Party.Header")); player.sendMessage(LocaleLoader.getString("Commands.Party.Header"));
player.sendMessage(LocaleLoader.getString("Commands.Party.Status", new Object[] {party.getName(), status})); player.sendMessage(LocaleLoader.getString("Commands.Party.Status", party.getName(), status));
boolean xpShareEnabled = Config.getInstance().getExpShareEnabled(); boolean xpShareEnabled = Config.getInstance().getExpShareEnabled();
boolean itemShareEnabled = Config.getInstance().getItemShareEnabled(); boolean itemShareEnabled = Config.getInstance().getItemShareEnabled();
if (xpShareEnabled) { if (xpShareEnabled) {
ExpShare = LocaleLoader.getString("Commands.Party.ExpShare", new Object[] { party.getXpShareMode().toString() }); ExpShare = LocaleLoader.getString("Commands.Party.ExpShare", party.getXpShareMode().toString());
} }
if (itemShareEnabled) { if (itemShareEnabled) {
ItemShare = LocaleLoader.getString("Commands.Party.ItemShare", new Object[] { itemShareMode }); ItemShare = LocaleLoader.getString("Commands.Party.ItemShare", itemShareMode);
} }
if (xpShareEnabled && itemShareEnabled) { if (xpShareEnabled && itemShareEnabled) {
@ -160,8 +160,8 @@ public class PartyCommand implements CommandExecutor {
} }
player.sendMessage(LocaleLoader.getString("Commands.Party.Members.Header")); player.sendMessage(LocaleLoader.getString("Commands.Party.Members.Header"));
player.sendMessage(LocaleLoader.getString("Commands.Party.MembersNear", new Object[] { membersNear, membersOnline })); player.sendMessage(LocaleLoader.getString("Commands.Party.MembersNear", membersNear, membersOnline));
player.sendMessage(LocaleLoader.getString("Commands.Party.Members", new Object[] {tempList})); player.sendMessage(LocaleLoader.getString("Commands.Party.Members", tempList));
} }
else { else {
return printUsage(); return printUsage();
@ -185,12 +185,12 @@ public class PartyCommand implements CommandExecutor {
Player target = mcMMO.p.getServer().getPlayer(args[1]); Player target = mcMMO.p.getServer().getPlayer(args[1]);
if (target == null) { if (target == null) {
player.sendMessage(LocaleLoader.getString("Party.NotOnline", new Object[] {args[1]})); player.sendMessage(LocaleLoader.getString("Party.NotOnline", args[1]));
return false; return false;
} }
if (!Users.getProfile(target).inParty()) { if (!Users.getProfile(target).inParty()) {
player.sendMessage(LocaleLoader.getString("Party.PlayerNotInParty", new Object[] {args[1]})); player.sendMessage(LocaleLoader.getString("Party.PlayerNotInParty", args[1]));
return false; return false;
} }
@ -300,7 +300,7 @@ public class PartyCommand implements CommandExecutor {
Party newParty = PartyManager.getParty(partyname); Party newParty = PartyManager.getParty(partyname);
// Check to see if the party exists, and if it does cancel creating a new party // Check to see if the party exists, and if it does cancel creating a new party
if (newParty != null) { if (newParty != null) {
player.sendMessage(LocaleLoader.getString("Commands.Party.AlreadyExists", new Object[] {partyname})); player.sendMessage(LocaleLoader.getString("Commands.Party.AlreadyExists", partyname));
return true; return true;
} }
@ -366,7 +366,7 @@ public class PartyCommand implements CommandExecutor {
Party party = playerProfile.getParty(); Party party = playerProfile.getParty();
if (args.length < 2) { if (args.length < 2) {
player.sendMessage(LocaleLoader.getString("Commands.Usage.2", new Object[] {"party", "expshare", "[sharemode]"})); player.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "expshare", "[sharemode]"));
return true; return true;
} }
@ -375,13 +375,13 @@ public class PartyCommand implements CommandExecutor {
party.setXpShareMode(ShareHandler.XpShareMode.NONE); party.setXpShareMode(ShareHandler.XpShareMode.NONE);
for (Player onlineMembers : party.getOnlineMembers()) { for (Player onlineMembers : party.getOnlineMembers()) {
onlineMembers.sendMessage(LocaleLoader.getString("Commands.Party.SetSharing", new Object[] {LocaleLoader.getString("Party.ShareType.Exp"), LocaleLoader.getString("Party.ShareMode.NoShare")})); onlineMembers.sendMessage(LocaleLoader.getString("Commands.Party.SetSharing", LocaleLoader.getString("Party.ShareType.Exp"), LocaleLoader.getString("Party.ShareMode.NoShare")));
} }
} else if (args[1].equalsIgnoreCase("equal") || args[1].equalsIgnoreCase("even")) { } else if (args[1].equalsIgnoreCase("equal") || args[1].equalsIgnoreCase("even")) {
party.setXpShareMode(ShareHandler.XpShareMode.EQUAL); party.setXpShareMode(ShareHandler.XpShareMode.EQUAL);
for (Player onlineMembers : party.getOnlineMembers()) { for (Player onlineMembers : party.getOnlineMembers()) {
onlineMembers.sendMessage(LocaleLoader.getString("Commands.Party.SetSharing", new Object[] {LocaleLoader.getString("Party.ShareType.Exp"), LocaleLoader.getString("Party.ShareMode.Equal")})); onlineMembers.sendMessage(LocaleLoader.getString("Commands.Party.SetSharing", LocaleLoader.getString("Party.ShareType.Exp"), LocaleLoader.getString("Party.ShareMode.Equal")));
} }
} }
} }
@ -428,7 +428,7 @@ public class PartyCommand implements CommandExecutor {
Users.getProfile(target).setInvite(party); Users.getProfile(target).setInvite(party);
player.sendMessage(LocaleLoader.getString("Commands.Invite.Success")); player.sendMessage(LocaleLoader.getString("Commands.Invite.Success"));
target.sendMessage(LocaleLoader.getString("Commands.Party.Invite.0", new Object[] {party.getName(), player.getName()})); target.sendMessage(LocaleLoader.getString("Commands.Party.Invite.0", party.getName(), player.getName()));
target.sendMessage(LocaleLoader.getString("Commands.Party.Invite.1")); target.sendMessage(LocaleLoader.getString("Commands.Party.Invite.1"));
return true; return true;
} }
@ -441,7 +441,7 @@ public class PartyCommand implements CommandExecutor {
return true; return true;
default: default:
player.sendMessage(LocaleLoader.getString("Commands.Usage.2", new Object[] {"party", "invite", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">"})); player.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "invite", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">"));
return true; return true;
} }
} }
@ -459,7 +459,7 @@ public class PartyCommand implements CommandExecutor {
if (party.getLeader().equals(playerName)) { if (party.getLeader().equals(playerName)) {
if (!party.getMembers().contains(targetName)) { if (!party.getMembers().contains(targetName)) {
player.sendMessage(LocaleLoader.getString("Party.NotInYourParty", new Object[] {targetName})); player.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName));
return true; return true;
} }
@ -475,7 +475,7 @@ public class PartyCommand implements CommandExecutor {
return true; return true;
} }
target.sendMessage(LocaleLoader.getString("Commands.Party.Kick", new Object[] {partyName})); target.sendMessage(LocaleLoader.getString("Commands.Party.Kick", partyName));
} }
PartyManager.removeFromParty(targetName, party); PartyManager.removeFromParty(targetName, party);
@ -531,13 +531,13 @@ public class PartyCommand implements CommandExecutor {
Party party = playerProfile.getParty(); Party party = playerProfile.getParty();
if (args.length < 2) { if (args.length < 2) {
player.sendMessage(LocaleLoader.getString("Commands.Usage.2", new Object[] {"party", "owner", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]"})); player.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "owner", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]"));
return true; return true;
} }
if (party.getLeader().equals(playerName)) { if (party.getLeader().equals(playerName)) {
if (!party.getMembers().contains(args[1])) { if (!party.getMembers().contains(args[1])) {
player.sendMessage(LocaleLoader.getString("Party.NotInYourParty", new Object[] {args[1]})); player.sendMessage(LocaleLoader.getString("Party.NotInYourParty", args[1]));
return true; return true;
} }
@ -633,7 +633,7 @@ public class PartyCommand implements CommandExecutor {
party.setLocked(true); party.setLocked(true);
party.setPassword(args[1]); party.setPassword(args[1]);
player.sendMessage(LocaleLoader.getString("Party.Password.Set", new Object[] {args[1]})); player.sendMessage(LocaleLoader.getString("Party.Password.Set", args[1]));
return true; return true;
} }
@ -652,7 +652,7 @@ public class PartyCommand implements CommandExecutor {
if (party.getLeader().equals(playerName)) { if (party.getLeader().equals(playerName)) {
if (args.length < 2) { if (args.length < 2) {
player.sendMessage(LocaleLoader.getString("Commands.Usage.2", new Object[] {"party", "rename", "<" + LocaleLoader.getString("Commands.Usage.PartyName") + ">"})); player.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "rename", "<" + LocaleLoader.getString("Commands.Usage.PartyName") + ">"));
return true; return true;
} }
@ -664,7 +664,7 @@ public class PartyCommand implements CommandExecutor {
// Check to see if the party exists, and if it does cancel renaming the party // Check to see if the party exists, and if it does cancel renaming the party
if (newParty != null) { if (newParty != null) {
player.sendMessage(LocaleLoader.getString("Commands.Party.AlreadyExists", new Object[] {newPartyName})); player.sendMessage(LocaleLoader.getString("Commands.Party.AlreadyExists", newPartyName));
return true; return true;
} }
@ -677,14 +677,14 @@ public class PartyCommand implements CommandExecutor {
} }
if (!onlineMembers.getName().equals(leader)) { if (!onlineMembers.getName().equals(leader)) {
onlineMembers.sendMessage(LocaleLoader.getString("Party.InformedOnNameChange", new Object[] {leader, newPartyName})); onlineMembers.sendMessage(LocaleLoader.getString("Party.InformedOnNameChange", leader, newPartyName));
} }
} }
party.setName(newPartyName); party.setName(newPartyName);
} }
player.sendMessage(LocaleLoader.getString("Commands.Party.Rename", new Object[] {newPartyName})); player.sendMessage(LocaleLoader.getString("Commands.Party.Rename", newPartyName));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Party.NotOwner")); player.sendMessage(LocaleLoader.getString("Party.NotOwner"));

View File

@ -26,7 +26,7 @@ public class PtpCommand implements CommandExecutor {
@Override @Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
String usage = LocaleLoader.getString("Commands.Usage.1", new Object[] { "ptp", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">" }); String usage = LocaleLoader.getString("Commands.Usage.1", "ptp", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">");
if (CommandHelper.noConsoleUsage(sender)) { if (CommandHelper.noConsoleUsage(sender)) {
return true; return true;
@ -51,7 +51,7 @@ public class PtpCommand implements CommandExecutor {
int ptpCooldown = Config.getInstance().getPTPCommandCooldown(); int ptpCooldown = Config.getInstance().getPTPCommandCooldown();
if (playerProfile.getRecentlyHurt() + (ptpCooldown * Misc.TIME_CONVERSION_FACTOR) > System.currentTimeMillis()) { if (playerProfile.getRecentlyHurt() + (ptpCooldown * Misc.TIME_CONVERSION_FACTOR) > System.currentTimeMillis()) {
player.sendMessage(LocaleLoader.getString("Party.Teleport.Hurt", new Object[] { ptpCooldown })); player.sendMessage(LocaleLoader.getString("Party.Teleport.Hurt", ptpCooldown));
return true; return true;
} }
@ -89,7 +89,7 @@ public class PtpCommand implements CommandExecutor {
PlayerProfile targetProfile = Users.getProfile(target); PlayerProfile targetProfile = Users.getProfile(target);
if (!targetProfile.getPtpEnabled()) { if (!targetProfile.getPtpEnabled()) {
player.sendMessage(LocaleLoader.getString("Party.Teleport.Disabled", new Object[] { target.getName() })); player.sendMessage(LocaleLoader.getString("Party.Teleport.Disabled", target.getName()));
return true; return true;
} }
@ -102,8 +102,8 @@ public class PtpCommand implements CommandExecutor {
} }
player.teleport(target); player.teleport(target);
player.sendMessage(LocaleLoader.getString("Party.Teleport.Player", new Object[] { player.getName() })); player.sendMessage(LocaleLoader.getString("Party.Teleport.Player", player.getName()));
target.sendMessage(LocaleLoader.getString("Party.Teleport.Target", new Object[] { target.getName() })); target.sendMessage(LocaleLoader.getString("Party.Teleport.Target", target.getName()));
playerProfile.setRecentlyHurt(System.currentTimeMillis()); playerProfile.setRecentlyHurt(System.currentTimeMillis());
} else { } else {
targetProfile.setPtpRequest(player); targetProfile.setPtpRequest(player);
@ -111,12 +111,12 @@ public class PtpCommand implements CommandExecutor {
player.sendMessage(LocaleLoader.getString("Commands.Invite.Success")); player.sendMessage(LocaleLoader.getString("Commands.Invite.Success"));
int ptpRequestExpire = Config.getInstance().getPTPCommandTimeout(); int ptpRequestExpire = Config.getInstance().getPTPCommandTimeout();
target.sendMessage(LocaleLoader.getString("Commands.ptp.Request1", new Object[] { player.getName() })); target.sendMessage(LocaleLoader.getString("Commands.ptp.Request1", player.getName()));
target.sendMessage(LocaleLoader.getString("Commands.ptp.Request2", new Object[] { ptpRequestExpire })); target.sendMessage(LocaleLoader.getString("Commands.ptp.Request2", ptpRequestExpire));
} }
} }
else { else {
player.sendMessage(LocaleLoader.getString("Party.NotInYourParty", new Object[] { target.getName() })); player.sendMessage(LocaleLoader.getString("Party.NotInYourParty", target.getName()));
} }
return true; return true;
} }
@ -155,8 +155,8 @@ public class PtpCommand implements CommandExecutor {
} }
target.teleport(player); target.teleport(player);
target.sendMessage(LocaleLoader.getString("Party.Teleport.Player", new Object[] { player.getName() })); target.sendMessage(LocaleLoader.getString("Party.Teleport.Player", player.getName()));
player.sendMessage(LocaleLoader.getString("Party.Teleport.Target", new Object[] { target.getName() })); player.sendMessage(LocaleLoader.getString("Party.Teleport.Target", target.getName()));
playerProfile.setRecentlyHurt(System.currentTimeMillis()); playerProfile.setRecentlyHurt(System.currentTimeMillis());
return true; return true;
} }

View File

@ -26,7 +26,7 @@ public class McRankAsync implements Runnable {
@Override @Override
public void run() { public void run() {
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Heading")); sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Heading"));
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Player", new Object[] {playerName})); sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Player", playerName));
for (SkillType skillType : SkillType.values()) { for (SkillType skillType : SkillType.values()) {
if (skillType.isChildSkill()) { if (skillType.isChildSkill()) {
@ -37,18 +37,18 @@ public class McRankAsync implements Runnable {
continue; // We want the overall ranking to be at the bottom continue; // We want the overall ranking to be at the bottom
if (skills.get(skillType.name()) == null) { if (skills.get(skillType.name()) == null) {
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Skill", new Object[] {SkillTools.localizeSkillName(skillType), LocaleLoader.getString("Commands.mcrank.Unranked")} )); sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Skill", SkillTools.localizeSkillName(skillType), LocaleLoader.getString("Commands.mcrank.Unranked")));
} }
else { else {
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Skill", new Object[] {SkillTools.localizeSkillName(skillType), skills.get(skillType.name())} )); sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Skill", SkillTools.localizeSkillName(skillType), skills.get(skillType.name())));
} }
} }
if (skills.get("ALL") == null) { if (skills.get("ALL") == null) {
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Overall", new Object[] {LocaleLoader.getString("Commands.mcrank.Unranked")} )); sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Overall", LocaleLoader.getString("Commands.mcrank.Unranked")));
} }
else { else {
sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Overall", new Object[] {skills.get("ALL")} )); sender.sendMessage(LocaleLoader.getString("Commands.mcrank.Overall", skills.get("ALL")));
} }
} }

View File

@ -55,21 +55,21 @@ public abstract class SkillCommand implements CommandExecutor {
dataCalculations(); dataCalculations();
permissionsCheck(); permissionsCheck();
player.sendMessage(LocaleLoader.getString("Skills.Header", new Object[] { LocaleLoader.getString(skillString + ".SkillName") })); player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString(skillString + ".SkillName")));
if (!skill.isChildSkill()) { if (!skill.isChildSkill()) {
player.sendMessage(LocaleLoader.getString("Commands.XPGain", new Object[] { LocaleLoader.getString("Commands.XPGain." + skillString) })); player.sendMessage(LocaleLoader.getString("Commands.XPGain", LocaleLoader.getString("Commands.XPGain." + skillString)));
player.sendMessage(LocaleLoader.getString("Effects.Level", new Object[] { profile.getSkillLevel(skill), profile.getSkillXpLevel(skill), profile.getXpToLevel(skill) })); player.sendMessage(LocaleLoader.getString("Effects.Level", profile.getSkillLevel(skill), profile.getSkillXpLevel(skill), profile.getXpToLevel(skill)));
} }
if (effectsHeaderPermissions()) { if (effectsHeaderPermissions()) {
player.sendMessage(LocaleLoader.getString("Skills.Header", new Object[] { LocaleLoader.getString("Effects.Effects") })); player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Effects.Effects")));
} }
effectsDisplay(); effectsDisplay();
if (statsHeaderPermissions()) { if (statsHeaderPermissions()) {
player.sendMessage(LocaleLoader.getString("Skills.Header", new Object[] { LocaleLoader.getString("Commands.Stats.Self") })); player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Commands.Stats.Self")));
} }
statsDisplay(); statsDisplay();
@ -155,7 +155,7 @@ public abstract class SkillCommand implements CommandExecutor {
protected void luckyEffectsDisplay() { protected void luckyEffectsDisplay() {
if (isLucky) { if (isLucky) {
String perkPrefix = LocaleLoader.getString("MOTD.PerksPrefix"); 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[] { SkillTools.localizeSkillName(skill) }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc", SkillTools.localizeSkillName(skill))));
} }
} }

View File

@ -33,7 +33,7 @@ public final class SkillGuide {
ArrayList<String> allStrings = new ArrayList<String>(); ArrayList<String> allStrings = new ArrayList<String>();
String split[] = LocaleLoader.getString(address).split("\n"); String split[] = LocaleLoader.getString(address).split("\n");
allStrings.add(LocaleLoader.getString("Guides.Header", new Object[] {header} )); allStrings.add(LocaleLoader.getString("Guides.Header", header));
//Add targeted strings //Add targeted strings
while (allStrings.size() < 9) { while (allStrings.size() < 9) {
@ -59,7 +59,7 @@ public final class SkillGuide {
String skillName = skilltype.toString(); String skillName = skilltype.toString();
String capitalized = Misc.getCapitalized(skillName); String capitalized = Misc.getCapitalized(skillName);
String localized = SkillTools.localizeSkillName(skilltype); String localized = SkillTools.localizeSkillName(skilltype);
player.sendMessage(LocaleLoader.getString("Guides.Available", new Object[] {localized, localized.toLowerCase()} )); player.sendMessage(LocaleLoader.getString("Guides.Available", localized, localized.toLowerCase()));
if (args.length >= 1 && args[0].equals("?")) { if (args.length >= 1 && args[0].equals("?")) {
String address = "Guides." + capitalized; String address = "Guides." + capitalized;
@ -85,14 +85,14 @@ public final class SkillGuide {
} }
} }
else { else {
player.sendMessage(LocaleLoader.getString("Guides.Page.OutOfRange", new Object[] {totalPages} )); player.sendMessage(LocaleLoader.getString("Guides.Page.OutOfRange", totalPages));
} }
} }
} }
// We have to specify this, else we get the usage string every time we call /skillname... // We have to specify this, else we get the usage string every time we call /skillname...
else if (args.length != 0) { else if (args.length != 0) {
player.sendMessage(LocaleLoader.getString("Guides.Usage", new Object[] {localized.toLowerCase()} )); player.sendMessage(LocaleLoader.getString("Guides.Usage", localized.toLowerCase()));
} }
} }
} }

View File

@ -56,15 +56,15 @@ public class AcrobaticsCommand extends SkillCommand {
luckyEffectsDisplay(); luckyEffectsDisplay();
if (canRoll) { if (canRoll) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Acrobatics.Effect.0"), LocaleLoader.getString("Acrobatics.Effect.1") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Acrobatics.Effect.0"), LocaleLoader.getString("Acrobatics.Effect.1")));
} }
if (canGracefulRoll) { if (canGracefulRoll) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Acrobatics.Effect.2"), LocaleLoader.getString("Acrobatics.Effect.3") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Acrobatics.Effect.2"), LocaleLoader.getString("Acrobatics.Effect.3")));
} }
if (canDodge) { if (canDodge) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Acrobatics.Effect.4"), LocaleLoader.getString("Acrobatics.Effect.5") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Acrobatics.Effect.4"), LocaleLoader.getString("Acrobatics.Effect.5")));
} }
} }

View File

@ -60,15 +60,15 @@ public class ArcheryCommand extends SkillCommand {
luckyEffectsDisplay(); luckyEffectsDisplay();
if (canSkillShot) { if (canSkillShot) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Archery.Effect.0"), LocaleLoader.getString("Archery.Effect.1") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Archery.Effect.0"), LocaleLoader.getString("Archery.Effect.1")));
} }
if (canDaze) { if (canDaze) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Archery.Effect.2"), LocaleLoader.getString("Archery.Effect.3", new Object[] {Archery.dazeModifier}) })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Archery.Effect.2"), LocaleLoader.getString("Archery.Effect.3", Archery.dazeModifier)));
} }
if (canRetrieve) { if (canRetrieve) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Archery.Effect.4"), LocaleLoader.getString("Archery.Effect.5") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Archery.Effect.4"), LocaleLoader.getString("Archery.Effect.5")));
} }
} }
@ -80,24 +80,24 @@ public class ArcheryCommand extends SkillCommand {
@Override @Override
protected void statsDisplay() { protected void statsDisplay() {
if (canSkillShot) { if (canSkillShot) {
player.sendMessage(LocaleLoader.getString("Archery.Combat.SkillshotBonus", new Object[] { skillShotBonus })); player.sendMessage(LocaleLoader.getString("Archery.Combat.SkillshotBonus", skillShotBonus));
} }
if (canDaze) { if (canDaze) {
if (isLucky) { if (isLucky) {
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", dazeChance) + LocaleLoader.getString("Perks.lucky.bonus", dazeChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Archery.Combat.DazeChance", new Object[] { dazeChance })); player.sendMessage(LocaleLoader.getString("Archery.Combat.DazeChance", dazeChance));
} }
} }
if (canRetrieve) { if (canRetrieve) {
if (isLucky) { if (isLucky) {
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", retrieveChance) + LocaleLoader.getString("Perks.lucky.bonus", retrieveChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Archery.Combat.RetrieveChance", new Object[] { retrieveChance })); player.sendMessage(LocaleLoader.getString("Archery.Combat.RetrieveChance", retrieveChance));
} }
} }
} }

View File

@ -68,23 +68,23 @@ public class AxesCommand extends SkillCommand {
luckyEffectsDisplay(); luckyEffectsDisplay();
if (canSkullSplitter) { if (canSkullSplitter) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Axes.Effect.0"), LocaleLoader.getString("Axes.Effect.1") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.0"), LocaleLoader.getString("Axes.Effect.1")));
} }
if (canCritical) { if (canCritical) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Axes.Effect.2"), LocaleLoader.getString("Axes.Effect.3") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.2"), LocaleLoader.getString("Axes.Effect.3")));
} }
if (canBonusDamage) { if (canBonusDamage) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Axes.Effect.4"), LocaleLoader.getString("Axes.Effect.5") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.4"), LocaleLoader.getString("Axes.Effect.5")));
} }
if (canImpact) { if (canImpact) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Axes.Effect.6"), LocaleLoader.getString("Axes.Effect.7") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.6"), LocaleLoader.getString("Axes.Effect.7")));
} }
if (canGreaterImpact) { if (canGreaterImpact) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Axes.Effect.8"), LocaleLoader.getString("Axes.Effect.9") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.8"), LocaleLoader.getString("Axes.Effect.9")));
} }
} }
@ -96,32 +96,32 @@ public class AxesCommand extends SkillCommand {
@Override @Override
protected void statsDisplay() { protected void statsDisplay() {
if (canBonusDamage) { if (canBonusDamage) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", new Object[] { LocaleLoader.getString("Axes.Ability.Bonus.0"), LocaleLoader.getString("Axes.Ability.Bonus.1", new Object[] {bonusDamage}) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.0"), LocaleLoader.getString("Axes.Ability.Bonus.1", bonusDamage)));
} }
if (canImpact) { if (canImpact) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", new Object[] { LocaleLoader.getString("Axes.Ability.Bonus.2"), LocaleLoader.getString("Axes.Ability.Bonus.3", new Object[] {impactDamage}) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.2"), LocaleLoader.getString("Axes.Ability.Bonus.3", impactDamage)));
} }
if (canGreaterImpact) { if (canGreaterImpact) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", new Object[] { LocaleLoader.getString("Axes.Ability.Bonus.4"), LocaleLoader.getString("Axes.Ability.Bonus.5", new Object[] {greaterImpactDamage}) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.4"), LocaleLoader.getString("Axes.Ability.Bonus.5", greaterImpactDamage)));
} }
if (canCritical) { if (canCritical) {
if (isLucky) { if (isLucky) {
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", critChance) + LocaleLoader.getString("Perks.lucky.bonus", critChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Axes.Combat.CritChance", new Object[] { critChance })); player.sendMessage(LocaleLoader.getString("Axes.Combat.CritChance", critChance));
} }
} }
if (canSkullSplitter) { if (canSkullSplitter) {
if (hasEndurance) { if (hasEndurance) {
player.sendMessage(LocaleLoader.getString("Axes.Combat.SS.Length", new Object[] { skullSplitterLength }) + LocaleLoader.getString("Perks.activationtime.bonus", new Object[] { skullSplitterLengthEndurance })); player.sendMessage(LocaleLoader.getString("Axes.Combat.SS.Length", skullSplitterLength) + LocaleLoader.getString("Perks.activationtime.bonus", skullSplitterLengthEndurance));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Axes.Combat.SS.Length", new Object[] { skullSplitterLength })); player.sendMessage(LocaleLoader.getString("Axes.Combat.SS.Length", skullSplitterLength));
} }
} }
} }

View File

@ -40,11 +40,11 @@ public class ExcavationCommand extends SkillCommand {
luckyEffectsDisplay(); luckyEffectsDisplay();
if (canGigaDrill) { if (canGigaDrill) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Excavation.Effect.0"), LocaleLoader.getString("Excavation.Effect.1") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Excavation.Effect.0"), LocaleLoader.getString("Excavation.Effect.1")));
} }
if (canTreasureHunt) { if (canTreasureHunt) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Excavation.Effect.2"), LocaleLoader.getString("Excavation.Effect.3") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Excavation.Effect.2"), LocaleLoader.getString("Excavation.Effect.3")));
} }
} }
@ -57,10 +57,10 @@ public class ExcavationCommand extends SkillCommand {
protected void statsDisplay() { protected void statsDisplay() {
if (canGigaDrill) { if (canGigaDrill) {
if (hasEndurance) { if (hasEndurance) {
player.sendMessage(LocaleLoader.getString("Excavation.Effect.Length", new Object[] { gigaDrillBreakerLength }) + LocaleLoader.getString("Perks.activationtime.bonus", new Object[] { gigaDrillBreakerLengthEndurance })); player.sendMessage(LocaleLoader.getString("Excavation.Effect.Length", gigaDrillBreakerLength) + LocaleLoader.getString("Perks.activationtime.bonus", gigaDrillBreakerLengthEndurance));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Excavation.Effect.Length", new Object[] { gigaDrillBreakerLength })); player.sendMessage(LocaleLoader.getString("Excavation.Effect.Length", gigaDrillBreakerLength));
} }
} }
} }

View File

@ -67,19 +67,19 @@ public class FishingCommand extends SkillCommand {
luckyEffectsDisplay(); luckyEffectsDisplay();
if (canTreasureHunt) { if (canTreasureHunt) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Fishing.Effect.0"), LocaleLoader.getString("Fishing.Effect.1") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.0"), LocaleLoader.getString("Fishing.Effect.1")));
} }
if (canMagicHunt) { if (canMagicHunt) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Fishing.Effect.2"), LocaleLoader.getString("Fishing.Effect.3") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.2"), LocaleLoader.getString("Fishing.Effect.3")));
} }
if (canShake) { if (canShake) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Fishing.Effect.4"), LocaleLoader.getString("Fishing.Effect.5") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.4"), LocaleLoader.getString("Fishing.Effect.5")));
} }
if (canFishermansDiet) { if (canFishermansDiet) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Fishing.Effect.6"), LocaleLoader.getString("Fishing.Effect.7") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.6"), LocaleLoader.getString("Fishing.Effect.7")));
} }
} }
@ -91,34 +91,34 @@ public class FishingCommand extends SkillCommand {
@Override @Override
protected void statsDisplay() { protected void statsDisplay() {
if (canTreasureHunt) { if (canTreasureHunt) {
player.sendMessage(LocaleLoader.getString("Fishing.Ability.Rank", new Object[] { lootTier })); player.sendMessage(LocaleLoader.getString("Fishing.Ability.Rank", lootTier));
} }
if (canMagicHunt) { if (canMagicHunt) {
if (isLucky) { if (isLucky) {
player.sendMessage(LocaleLoader.getString("Fishing.Enchant.Chance", new Object[] { magicChance}) + chanceRaining + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { magicChanceLucky })); player.sendMessage(LocaleLoader.getString("Fishing.Enchant.Chance", magicChance) + chanceRaining + LocaleLoader.getString("Perks.lucky.bonus", magicChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Fishing.Enchant.Chance", new Object[] { magicChance}) + chanceRaining); player.sendMessage(LocaleLoader.getString("Fishing.Enchant.Chance", magicChance) + chanceRaining);
} }
} }
if (canShake) { if (canShake) {
if (skillValue < AdvancedConfig.getInstance().getShakeUnlockLevel()) { if (skillValue < AdvancedConfig.getInstance().getShakeUnlockLevel()) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", new Object[] { LocaleLoader.getString("Fishing.Ability.Locked.0", new Object[] { AdvancedConfig.getInstance().getShakeUnlockLevel() }) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Fishing.Ability.Locked.0", AdvancedConfig.getInstance().getShakeUnlockLevel())));
} }
else { else {
if (isLucky) { if (isLucky) {
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", shakeChance) + LocaleLoader.getString("Perks.lucky.bonus", shakeChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Fishing.Ability.Shake", new Object[] { shakeChance })); player.sendMessage(LocaleLoader.getString("Fishing.Ability.Shake", shakeChance));
} }
} }
} }
if (canFishermansDiet) { if (canFishermansDiet) {
player.sendMessage(LocaleLoader.getString("Fishing.Ability.FD", new Object[] { fishermansDietRank })); player.sendMessage(LocaleLoader.getString("Fishing.Ability.FD", fishermansDietRank));
} }
} }
} }

View File

@ -78,27 +78,27 @@ public class HerbalismCommand extends SkillCommand {
luckyEffectsDisplay(); luckyEffectsDisplay();
if (canGreenTerra) { if (canGreenTerra) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Herbalism.Effect.0"), LocaleLoader.getString("Herbalism.Effect.1") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.0"), LocaleLoader.getString("Herbalism.Effect.1")));
} }
if (canGreenThumbWheat) { if (canGreenThumbWheat) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Herbalism.Effect.2"), LocaleLoader.getString("Herbalism.Effect.3") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.2"), LocaleLoader.getString("Herbalism.Effect.3")));
} }
if (canGreenThumbBlocks) { if (canGreenThumbBlocks) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Herbalism.Effect.4"), LocaleLoader.getString("Herbalism.Effect.5") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.4"), LocaleLoader.getString("Herbalism.Effect.5")));
} }
if (canFarmersDiet) { if (canFarmersDiet) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Herbalism.Effect.6"), LocaleLoader.getString("Herbalism.Effect.7") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.6"), LocaleLoader.getString("Herbalism.Effect.7")));
} }
if (hasHylianLuck) { if (hasHylianLuck) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Herbalism.Effect.10"), LocaleLoader.getString("Herbalism.Effect.11") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.10"), LocaleLoader.getString("Herbalism.Effect.11")));
} }
if (canDoubleDrop && !doubleDropsDisabled) { if (canDoubleDrop && !doubleDropsDisabled) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Herbalism.Effect.8"), LocaleLoader.getString("Herbalism.Effect.9") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Herbalism.Effect.8"), LocaleLoader.getString("Herbalism.Effect.9")));
} }
} }
@ -111,44 +111,44 @@ public class HerbalismCommand extends SkillCommand {
protected void statsDisplay() { protected void statsDisplay() {
if (canGreenTerra) { if (canGreenTerra) {
if (hasEndurance) { if (hasEndurance) {
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTe.Length", new Object[] { greenTerraLength }) + LocaleLoader.getString("Perks.activationtime.bonus", new Object[] { greenTerraLengthEndurance })); player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTe.Length", greenTerraLength) + LocaleLoader.getString("Perks.activationtime.bonus", greenTerraLengthEndurance));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTe.Length", new Object[] { greenTerraLength })); player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTe.Length", greenTerraLength));
} }
} }
if (canGreenThumbBlocks || canGreenThumbWheat) { if (canGreenThumbBlocks || canGreenThumbWheat) {
if (isLucky) { if (isLucky) {
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", greenThumbChance) + LocaleLoader.getString("Perks.lucky.bonus", greenThumbChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTh.Chance", new Object[] { greenThumbChance })); player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTh.Chance", greenThumbChance));
} }
} }
if (canGreenThumbWheat) { if (canGreenThumbWheat) {
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTh.Stage", new Object[] { greenThumbStage })); player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTh.Stage", greenThumbStage));
} }
if (canFarmersDiet) { if (canFarmersDiet) {
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.FD", new Object[] { farmersDietRank } )); player.sendMessage(LocaleLoader.getString("Herbalism.Ability.FD", farmersDietRank));
} }
if (hasHylianLuck) { if (hasHylianLuck) {
if (isLucky) { if (isLucky) {
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.HylianLuck", new Object[] { hylianLuckChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { hylianLuckChanceLucky })); player.sendMessage(LocaleLoader.getString("Herbalism.Ability.HylianLuck", hylianLuckChance) + LocaleLoader.getString("Perks.lucky.bonus", hylianLuckChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.HylianLuck", new Object[] { hylianLuckChance })); player.sendMessage(LocaleLoader.getString("Herbalism.Ability.HylianLuck", hylianLuckChance));
} }
} }
if (canDoubleDrop && !doubleDropsDisabled) { if (canDoubleDrop && !doubleDropsDisabled) {
if (isLucky) { if (isLucky) {
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", doubleDropChance) + LocaleLoader.getString("Perks.lucky.bonus", doubleDropChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.DoubleDropChance", new Object[] { doubleDropChance })); player.sendMessage(LocaleLoader.getString("Herbalism.Ability.DoubleDropChance", doubleDropChance));
} }
} }
} }

View File

@ -106,23 +106,23 @@ public class MiningCommand extends SkillCommand {
luckyEffectsDisplay(); luckyEffectsDisplay();
if (canSuperBreaker) { if (canSuperBreaker) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Mining.Effect.0"), LocaleLoader.getString("Mining.Effect.1") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Mining.Effect.0"), LocaleLoader.getString("Mining.Effect.1")));
} }
if (canDoubleDrop && !doubleDropsDisabled) { if (canDoubleDrop && !doubleDropsDisabled) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Mining.Effect.2"), LocaleLoader.getString("Mining.Effect.3") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Mining.Effect.2"), LocaleLoader.getString("Mining.Effect.3")));
} }
if (canBlast) { if (canBlast) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Mining.Effect.4"), LocaleLoader.getString("Mining.Effect.5") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Mining.Effect.4"), LocaleLoader.getString("Mining.Effect.5")));
} }
if (canBiggerBombs) { if (canBiggerBombs) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Mining.Effect.6"), LocaleLoader.getString("Mining.Effect.7") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Mining.Effect.6"), LocaleLoader.getString("Mining.Effect.7")));
} }
if (canDemoExpert) { if (canDemoExpert) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Mining.Effect.8"), LocaleLoader.getString("Mining.Effect.9") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Mining.Effect.8"), LocaleLoader.getString("Mining.Effect.9")));
} }
} }
@ -135,46 +135,46 @@ public class MiningCommand extends SkillCommand {
protected void statsDisplay() { protected void statsDisplay() {
if (canDoubleDrop && !doubleDropsDisabled) { if (canDoubleDrop && !doubleDropsDisabled) {
if (isLucky) { if (isLucky) {
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", doubleDropChance) + LocaleLoader.getString("Perks.lucky.bonus", doubleDropChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Mining.Effect.DropChance", new Object[] { doubleDropChance })); player.sendMessage(LocaleLoader.getString("Mining.Effect.DropChance", doubleDropChance));
} }
} }
if (canSuperBreaker) { if (canSuperBreaker) {
if (hasEndurance) { if (hasEndurance) {
player.sendMessage(LocaleLoader.getString("Mining.Ability.Length", new Object[] { superBreakerLength }) + LocaleLoader.getString("Perks.activationtime.bonus", new Object[] { superBreakerLengthEndurance })); player.sendMessage(LocaleLoader.getString("Mining.Ability.Length", superBreakerLength) + LocaleLoader.getString("Perks.activationtime.bonus", superBreakerLengthEndurance));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Mining.Ability.Length", new Object[] { superBreakerLength })); player.sendMessage(LocaleLoader.getString("Mining.Ability.Length", superBreakerLength));
} }
} }
if (canBlast) { if (canBlast) {
if (skillValue < BlastMining.rank1) { if (skillValue < BlastMining.rank1) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", new Object[] { LocaleLoader.getString("Mining.Ability.Locked.0", new Object[] { BlastMining.rank1 }) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.0", BlastMining.rank1)));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Mining.Blast.Rank", new Object[] { blastMiningRank, LocaleLoader.getString("Mining.Blast.Effect." + (Misc.getInt(blastMiningRank) - 1)) })); player.sendMessage(LocaleLoader.getString("Mining.Blast.Rank", blastMiningRank, LocaleLoader.getString("Mining.Blast.Effect." + (Misc.getInt(blastMiningRank) - 1))));
} }
} }
if (canBiggerBombs) { if (canBiggerBombs) {
if (skillValue < BlastMining.rank2) { if (skillValue < BlastMining.rank2) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", new Object[] { LocaleLoader.getString("Mining.Ability.Locked.1", new Object[] { BlastMining.rank2 }) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.1", BlastMining.rank2)));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Mining.Blast.Radius.Increase", new Object[] { blastRadiusIncrease })); player.sendMessage(LocaleLoader.getString("Mining.Blast.Radius.Increase", blastRadiusIncrease));
} }
} }
if (canDemoExpert) { if (canDemoExpert) {
if (skillValue < BlastMining.rank4) { if (skillValue < BlastMining.rank4) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", new Object[] { LocaleLoader.getString("Mining.Ability.Locked.2", new Object[] { BlastMining.rank4 }) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.2", BlastMining.rank4)));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Mining.Effect.Decrease", new Object[] { blastDamageDecrease })); player.sendMessage(LocaleLoader.getString("Mining.Effect.Decrease", blastDamageDecrease));
} }
} }
} }

View File

@ -44,7 +44,7 @@ public class RemoteDetonationEventHandler {
PlayerProfile profile = mcMMOPlayer.getProfile(); PlayerProfile profile = mcMMOPlayer.getProfile();
if (!SkillTools.cooldownOver(profile.getSkillDATS(AbilityType.BLAST_MINING) * Misc.TIME_CONVERSION_FACTOR, AbilityType.BLAST_MINING.getCooldown(), player)) { if (!SkillTools.cooldownOver(profile.getSkillDATS(AbilityType.BLAST_MINING) * Misc.TIME_CONVERSION_FACTOR, AbilityType.BLAST_MINING.getCooldown(), player)) {
player.sendMessage(LocaleLoader.getString("Skills.TooTired", new Object[] { SkillTools.calculateTimeLeft(profile.getSkillDATS(AbilityType.BLAST_MINING) * Misc.TIME_CONVERSION_FACTOR, AbilityType.BLAST_MINING.getCooldown(), player) })); player.sendMessage(LocaleLoader.getString("Skills.TooTired", SkillTools.calculateTimeLeft(profile.getSkillDATS(AbilityType.BLAST_MINING) * Misc.TIME_CONVERSION_FACTOR, AbilityType.BLAST_MINING.getCooldown(), player)));
return false; return false;
} }

View File

@ -92,40 +92,40 @@ public class RepairCommand extends SkillCommand {
protected void effectsDisplay() { protected void effectsDisplay() {
luckyEffectsDisplay(); luckyEffectsDisplay();
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Repair.Effect.0"), LocaleLoader.getString("Repair.Effect.1") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.0"), LocaleLoader.getString("Repair.Effect.1")));
if (canMasterRepair) { if (canMasterRepair) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Repair.Effect.2"), LocaleLoader.getString("Repair.Effect.3") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.2"), LocaleLoader.getString("Repair.Effect.3")));
} }
if (canSuperRepair) { if (canSuperRepair) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Repair.Effect.4"), LocaleLoader.getString("Repair.Effect.5") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.4"), LocaleLoader.getString("Repair.Effect.5")));
} }
/* Repair Level Requirements */ /* Repair Level Requirements */
if (canRepairStone && stoneLevel > 0) { if (canRepairStone && stoneLevel > 0) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Repair.Effect.14", new Object[] { stoneLevel }), LocaleLoader.getString("Repair.Effect.15") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.14", stoneLevel), LocaleLoader.getString("Repair.Effect.15")));
} }
if (canRepairIron && ironLevel > 0) { if (canRepairIron && ironLevel > 0) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Repair.Effect.12", new Object[] { ironLevel }), LocaleLoader.getString("Repair.Effect.13") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.12", ironLevel), LocaleLoader.getString("Repair.Effect.13")));
} }
if (canRepairGold && goldLevel > 0) { if (canRepairGold && goldLevel > 0) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Repair.Effect.10", new Object[] { goldLevel }), LocaleLoader.getString("Repair.Effect.11") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.10", goldLevel), LocaleLoader.getString("Repair.Effect.11")));
} }
if (canRepairDiamond && diamondLevel > 0) { if (canRepairDiamond && diamondLevel > 0) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Repair.Effect.6", new Object[] { diamondLevel }), LocaleLoader.getString("Repair.Effect.7") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.6", diamondLevel), LocaleLoader.getString("Repair.Effect.7")));
} }
if (canSalvage && Salvage.salvageUnlockLevel > 0) { if (canSalvage && Salvage.salvageUnlockLevel > 0) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Repair.Effect.16", new Object[] { Salvage.salvageUnlockLevel }), LocaleLoader.getString("Repair.Effect.17") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.16", Salvage.salvageUnlockLevel), LocaleLoader.getString("Repair.Effect.17")));
} }
if (canArcaneForge) { if (canArcaneForge) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Repair.Effect.8"), LocaleLoader.getString("Repair.Effect.9") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Repair.Effect.8"), LocaleLoader.getString("Repair.Effect.9")));
} }
} }
@ -137,27 +137,27 @@ public class RepairCommand extends SkillCommand {
@Override @Override
protected void statsDisplay() { protected void statsDisplay() {
if (canMasterRepair) { if (canMasterRepair) {
player.sendMessage(LocaleLoader.getString("Repair.Skills.Mastery", new Object[] { repairMasteryBonus })); player.sendMessage(LocaleLoader.getString("Repair.Skills.Mastery", repairMasteryBonus));
} }
if (canSuperRepair) { if (canSuperRepair) {
if (isLucky) { if (isLucky) {
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", superRepairChance) + LocaleLoader.getString("Perks.lucky.bonus", superRepairChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Repair.Skills.Super.Chance", new Object[] { superRepairChance })); player.sendMessage(LocaleLoader.getString("Repair.Skills.Super.Chance", superRepairChance));
} }
} }
if (canArcaneForge) { if (canArcaneForge) {
player.sendMessage(LocaleLoader.getString("Repair.Arcane.Rank", new Object[] { arcaneForgingRank })); player.sendMessage(LocaleLoader.getString("Repair.Arcane.Rank", arcaneForgingRank));
if (Repair.arcaneForgingEnchantLoss) { if (Repair.arcaneForgingEnchantLoss) {
player.sendMessage(LocaleLoader.getString("Repair.Arcane.Chance.Success", new Object[] { (arcaneBypass ? 100 : Repair.getEnchantChance(arcaneForgingRank)) })); player.sendMessage(LocaleLoader.getString("Repair.Arcane.Chance.Success", (arcaneBypass ? 100 : Repair.getEnchantChance(arcaneForgingRank))));
} }
if (Repair.arcaneForgingDowngrades) { if (Repair.arcaneForgingDowngrades) {
player.sendMessage(LocaleLoader.getString("Repair.Arcane.Chance.Downgrade", new Object[] { (arcaneBypass ? 0 : Repair.getDowngradeChance(arcaneForgingRank)) })); player.sendMessage(LocaleLoader.getString("Repair.Arcane.Chance.Downgrade", (arcaneBypass ? 0 : Repair.getDowngradeChance(arcaneForgingRank))));
} }
} }
} }

View File

@ -76,7 +76,7 @@ public class SimpleRepairManager implements RepairManager {
// Level check // Level check
if (skillLevel < repairable.getMinimumLevel()) { if (skillLevel < repairable.getMinimumLevel()) {
player.sendMessage(LocaleLoader.getString("Repair.Skills.Adept", new Object[] { String.valueOf(repairable.getMinimumLevel()), Misc.prettyItemString(item.getTypeId()) } )); player.sendMessage(LocaleLoader.getString("Repair.Skills.Adept", String.valueOf(repairable.getMinimumLevel()), Misc.prettyItemString(item.getTypeId())));
return; return;
} }
@ -84,7 +84,7 @@ public class SimpleRepairManager implements RepairManager {
// Check if they have the proper material to repair with // Check if they have the proper material to repair with
if (!inventory.contains(repairable.getRepairMaterialId())) { if (!inventory.contains(repairable.getRepairMaterialId())) {
String message = LocaleLoader.getString("Skills.NeedMore", new Object[] { Misc.prettyItemString(repairable.getRepairMaterialId()) }); String message = LocaleLoader.getString("Skills.NeedMore", Misc.prettyItemString(repairable.getRepairMaterialId()));
if (repairable.getRepairMaterialMetadata() != (byte) -1) { if (repairable.getRepairMaterialMetadata() != (byte) -1) {
// TODO: Do something nicer than append the metadata as a :# ? // TODO: Do something nicer than append the metadata as a :# ?
if (findInInventory(inventory, repairable.getRepairMaterialId(), repairable.getRepairMaterialMetadata()) == -1) { if (findInInventory(inventory, repairable.getRepairMaterialId(), repairable.getRepairMaterialMetadata()) == -1) {

View File

@ -73,19 +73,19 @@ public class SmeltingCommand extends SkillCommand {
luckyEffectsDisplay(); luckyEffectsDisplay();
if (canFuelEfficiency) { if (canFuelEfficiency) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Smelting.Effect.0"), LocaleLoader.getString("Smelting.Effect.1") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Smelting.Effect.0"), LocaleLoader.getString("Smelting.Effect.1")));
} }
if (canSecondSmelt) { if (canSecondSmelt) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Smelting.Effect.2"), LocaleLoader.getString("Smelting.Effect.3") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Smelting.Effect.2"), LocaleLoader.getString("Smelting.Effect.3")));
} }
if (canVanillaXPBoost) { if (canVanillaXPBoost) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Smelting.Effect.4"), LocaleLoader.getString("Smelting.Effect.5") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Smelting.Effect.4"), LocaleLoader.getString("Smelting.Effect.5")));
} }
if (canFluxMine) { if (canFluxMine) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Smelting.Effect.6"), LocaleLoader.getString("Smelting.Effect.7") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Smelting.Effect.6"), LocaleLoader.getString("Smelting.Effect.7")));
} }
} }
@ -97,36 +97,36 @@ public class SmeltingCommand extends SkillCommand {
@Override @Override
protected void statsDisplay() { protected void statsDisplay() {
if (canFuelEfficiency) { if (canFuelEfficiency) {
player.sendMessage(LocaleLoader.getString("Smelting.Ability.FuelEfficiency", new Object[] { burnTimeModifier })); player.sendMessage(LocaleLoader.getString("Smelting.Ability.FuelEfficiency", burnTimeModifier));
} }
if (canSecondSmelt) { if (canSecondSmelt) {
if (isLucky) { if (isLucky) {
player.sendMessage(LocaleLoader.getString("Smelting.Ability.SecondSmelt", new Object[] { secondSmeltChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { secondSmeltChanceLucky })); player.sendMessage(LocaleLoader.getString("Smelting.Ability.SecondSmelt", secondSmeltChance) + LocaleLoader.getString("Perks.lucky.bonus", secondSmeltChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Smelting.Ability.SecondSmelt", new Object[] { secondSmeltChance })); player.sendMessage(LocaleLoader.getString("Smelting.Ability.SecondSmelt", secondSmeltChance));
} }
} }
if (canVanillaXPBoost) { if (canVanillaXPBoost) {
if (skillValue < Smelting.vanillaXPBoostRank1Level) { if (skillValue < Smelting.vanillaXPBoostRank1Level) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", new Object[] { LocaleLoader.getString("Smelting.Ability.Locked.0", new Object[] { Smelting.vanillaXPBoostRank1Level } ) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Smelting.Ability.Locked.0", Smelting.vanillaXPBoostRank1Level)));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Smelting.Ability.VanillaXPBoost", new Object[] { vanillaXPModifier })); player.sendMessage(LocaleLoader.getString("Smelting.Ability.VanillaXPBoost", vanillaXPModifier));
} }
} }
if (canFluxMine) { if (canFluxMine) {
if (skillValue < Smelting.fluxMiningUnlockLevel) { if (skillValue < Smelting.fluxMiningUnlockLevel) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", new Object[] { LocaleLoader.getString("Smelting.Ability.Locked.1", new Object[] { Smelting.fluxMiningUnlockLevel } ) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Smelting.Ability.Locked.1", Smelting.fluxMiningUnlockLevel)));
} }
else if (isLucky) { else if (isLucky) {
player.sendMessage(LocaleLoader.getString("Smelting.Ability.FluxMining", new Object[] { fluxMiningChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { fluxMiningChanceLucky })); player.sendMessage(LocaleLoader.getString("Smelting.Ability.FluxMining", fluxMiningChance) + LocaleLoader.getString("Perks.lucky.bonus", fluxMiningChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Smelting.Ability.FluxMining", new Object[] { fluxMiningChance })); player.sendMessage(LocaleLoader.getString("Smelting.Ability.FluxMining", fluxMiningChance));
} }
} }
} }

View File

@ -64,16 +64,16 @@ public class SwordsCommand extends SkillCommand {
luckyEffectsDisplay(); luckyEffectsDisplay();
if (canCounter) { if (canCounter) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Swords.Effect.0"), LocaleLoader.getString("Swords.Effect.1", new Object[] {percent.format(1.0D / Swords.counterAttackModifier)} ) })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Swords.Effect.0"), LocaleLoader.getString("Swords.Effect.1", percent.format(1.0D / Swords.counterAttackModifier))));
} }
if (canSerratedStrike) { if (canSerratedStrike) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Swords.Effect.2"), LocaleLoader.getString("Swords.Effect.3", new Object[] {percent.format(1.0D / Swords.serratedStrikesModifier)}) })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Swords.Effect.2"), LocaleLoader.getString("Swords.Effect.3", percent.format(1.0D / Swords.serratedStrikesModifier))));
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Swords.Effect.4"), LocaleLoader.getString("Swords.Effect.5", new Object[] {Swords.serratedStrikesBleedTicks}) })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Swords.Effect.4"), LocaleLoader.getString("Swords.Effect.5", Swords.serratedStrikesBleedTicks)));
} }
if (canBleed) { if (canBleed) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Swords.Effect.6"), LocaleLoader.getString("Swords.Effect.7") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Swords.Effect.6"), LocaleLoader.getString("Swords.Effect.7")));
} }
} }
@ -86,31 +86,31 @@ public class SwordsCommand extends SkillCommand {
protected void statsDisplay() { protected void statsDisplay() {
if (canCounter) { if (canCounter) {
if (isLucky) { if (isLucky) {
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", counterAttackChance) + LocaleLoader.getString("Perks.lucky.bonus", counterAttackChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Swords.Combat.Counter.Chance", new Object[] { counterAttackChance })); player.sendMessage(LocaleLoader.getString("Swords.Combat.Counter.Chance", counterAttackChance));
} }
} }
if (canBleed) { if (canBleed) {
player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Length", new Object[] { bleedLength })); player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Length", bleedLength));
player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Note")); player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Note"));
if (isLucky) { if (isLucky) {
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", bleedChance) + LocaleLoader.getString("Perks.lucky.bonus", bleedChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Chance", new Object[] { bleedChance })); player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleed.Chance", bleedChance));
} }
} }
if (canSerratedStrike) { if (canSerratedStrike) {
if (hasEndurance) { if (hasEndurance) {
player.sendMessage(LocaleLoader.getString("Swords.SS.Length", new Object[] { serratedStrikesLength }) + LocaleLoader.getString("Perks.activationtime.bonus", new Object[] { serratedStrikesLengthEndurance })); player.sendMessage(LocaleLoader.getString("Swords.SS.Length", serratedStrikesLength) + LocaleLoader.getString("Perks.activationtime.bonus", serratedStrikesLengthEndurance));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Swords.SS.Length", new Object[] { serratedStrikesLength })); player.sendMessage(LocaleLoader.getString("Swords.SS.Length", serratedStrikesLength));
} }
} }
} }

View File

@ -26,10 +26,10 @@ public class BeastLoreEventHandler {
String message = LocaleLoader.getString("Combat.BeastLore") + " "; String message = LocaleLoader.getString("Combat.BeastLore") + " ";
if (beast.isTamed()) { if (beast.isTamed()) {
message = message.concat(LocaleLoader.getString("Combat.BeastLoreOwner", new Object[] { getOwnerName() }) + " "); message = message.concat(LocaleLoader.getString("Combat.BeastLoreOwner", getOwnerName()) + " ");
} }
message = message.concat(LocaleLoader.getString("Combat.BeastLoreHealth", new Object[] { livingEntity.getHealth(), livingEntity.getMaxHealth() })); message = message.concat(LocaleLoader.getString("Combat.BeastLoreHealth", livingEntity.getHealth(), livingEntity.getMaxHealth()));
player.sendMessage(message); player.sendMessage(message);
} }

View File

@ -30,7 +30,7 @@ public class CallOfTheWildEventHandler {
if (player == null) if (player == null)
return; return;
player.sendMessage(LocaleLoader.getString("Skills.NeedMore", new Object[] { Misc.prettyItemString(inHand.getTypeId()) })); player.sendMessage(LocaleLoader.getString("Skills.NeedMore", Misc.prettyItemString(inHand.getTypeId())));
} }
protected boolean nearbyEntityExists() { protected boolean nearbyEntityExists() {

View File

@ -52,37 +52,37 @@ public class TamingCommand extends SkillCommand {
luckyEffectsDisplay(); luckyEffectsDisplay();
if (canBeastLore) { if (canBeastLore) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Taming.Effect.0"), LocaleLoader.getString("Taming.Effect.1") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.0"), LocaleLoader.getString("Taming.Effect.1")));
} }
if (canGore) { if (canGore) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Taming.Effect.2"), LocaleLoader.getString("Taming.Effect.3") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.2"), LocaleLoader.getString("Taming.Effect.3")));
} }
if (canSharpenedClaws) { if (canSharpenedClaws) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Taming.Effect.4"), LocaleLoader.getString("Taming.Effect.5") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.4"), LocaleLoader.getString("Taming.Effect.5")));
} }
if (canEnvironmentallyAware) { if (canEnvironmentallyAware) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Taming.Effect.6"), LocaleLoader.getString("Taming.Effect.7") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.6"), LocaleLoader.getString("Taming.Effect.7")));
} }
if (canThickFur) { if (canThickFur) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Taming.Effect.8"), LocaleLoader.getString("Taming.Effect.9") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.8"), LocaleLoader.getString("Taming.Effect.9")));
} }
if (canShockProof) { if (canShockProof) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Taming.Effect.10"), LocaleLoader.getString("Taming.Effect.11") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.10"), LocaleLoader.getString("Taming.Effect.11")));
} }
if (canFastFood) { if (canFastFood) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Taming.Effect.16"), LocaleLoader.getString("Taming.Effect.17") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.16"), LocaleLoader.getString("Taming.Effect.17")));
} }
if (canCallWild) { if (canCallWild) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Taming.Effect.12"), LocaleLoader.getString("Taming.Effect.13") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.12"), LocaleLoader.getString("Taming.Effect.13")));
player.sendMessage(LocaleLoader.getString("Taming.Effect.14", new Object[] { Config.getInstance().getTamingCOTWOcelotCost() })); player.sendMessage(LocaleLoader.getString("Taming.Effect.14", Config.getInstance().getTamingCOTWOcelotCost()));
player.sendMessage(LocaleLoader.getString("Taming.Effect.15", new Object[] { Config.getInstance().getTamingCOTWWolfCost() })); player.sendMessage(LocaleLoader.getString("Taming.Effect.15", Config.getInstance().getTamingCOTWWolfCost()));
} }
} }
@ -95,55 +95,55 @@ public class TamingCommand extends SkillCommand {
protected void statsDisplay() { protected void statsDisplay() {
if (canFastFood) { if (canFastFood) {
if (skillValue < Taming.fastFoodServiceUnlockLevel) { if (skillValue < Taming.fastFoodServiceUnlockLevel) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", new Object[] { LocaleLoader.getString("Taming.Ability.Locked.4", new Object[] { Taming.fastFoodServiceUnlockLevel } ) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Taming.Ability.Locked.4", Taming.fastFoodServiceUnlockLevel)));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", new Object[] { LocaleLoader.getString("Taming.Ability.Bonus.8"), LocaleLoader.getString("Taming.Ability.Bonus.9", new Object[] { percent.format(Taming.fastFoodServiceActivationChance) } ) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Taming.Ability.Bonus.8"), LocaleLoader.getString("Taming.Ability.Bonus.9", percent.format(Taming.fastFoodServiceActivationChance))));
} }
} }
if (canEnvironmentallyAware) { if (canEnvironmentallyAware) {
if (skillValue < Taming.environmentallyAwareUnlockLevel) { if (skillValue < Taming.environmentallyAwareUnlockLevel) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", new Object[] { LocaleLoader.getString("Taming.Ability.Locked.0", new Object[] { Taming.environmentallyAwareUnlockLevel } ) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Taming.Ability.Locked.0", Taming.environmentallyAwareUnlockLevel)));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", new Object[] { LocaleLoader.getString("Taming.Ability.Bonus.0"), LocaleLoader.getString("Taming.Ability.Bonus.1") })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Taming.Ability.Bonus.0"), LocaleLoader.getString("Taming.Ability.Bonus.1")));
} }
} }
if (canThickFur) { if (canThickFur) {
if (skillValue < Taming.thickFurUnlockLevel) { if (skillValue < Taming.thickFurUnlockLevel) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", new Object[] { LocaleLoader.getString("Taming.Ability.Locked.1", new Object[] { Taming.thickFurUnlockLevel } ) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Taming.Ability.Locked.1", Taming.thickFurUnlockLevel)));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", new Object[] { LocaleLoader.getString("Taming.Ability.Bonus.2"), LocaleLoader.getString("Taming.Ability.Bonus.3", new Object[] { Taming.thickFurModifier }) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Taming.Ability.Bonus.2"), LocaleLoader.getString("Taming.Ability.Bonus.3", Taming.thickFurModifier)));
} }
} }
if (canShockProof) { if (canShockProof) {
if (skillValue < Taming.shockProofUnlockLevel) { if (skillValue < Taming.shockProofUnlockLevel) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", new Object[] { LocaleLoader.getString("Taming.Ability.Locked.2", new Object[] { Taming.shockProofUnlockLevel } ) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Taming.Ability.Locked.2", Taming.shockProofUnlockLevel)));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", new Object[] { LocaleLoader.getString("Taming.Ability.Bonus.4"), LocaleLoader.getString("Taming.Ability.Bonus.5", new Object[] { Taming.shockProofModifier }) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Taming.Ability.Bonus.4"), LocaleLoader.getString("Taming.Ability.Bonus.5", Taming.shockProofModifier)));
} }
} }
if (canSharpenedClaws) { if (canSharpenedClaws) {
if (skillValue < Taming.sharpenedClawsUnlockLevel) { if (skillValue < Taming.sharpenedClawsUnlockLevel) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", new Object[] { LocaleLoader.getString("Taming.Ability.Locked.3", new Object[] { Taming.sharpenedClawsUnlockLevel } ) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Taming.Ability.Locked.3", Taming.sharpenedClawsUnlockLevel)));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", new Object[] { LocaleLoader.getString("Taming.Ability.Bonus.6"), LocaleLoader.getString("Taming.Ability.Bonus.7", new Object[] { Taming.sharpenedClawsBonusDamage }) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Taming.Ability.Bonus.6"), LocaleLoader.getString("Taming.Ability.Bonus.7", Taming.sharpenedClawsBonusDamage)));
} }
} }
if (canGore) { if (canGore) {
if (isLucky) { if (isLucky) {
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", goreChance) + LocaleLoader.getString("Perks.lucky.bonus", goreChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Taming.Combat.Chance.Gore", new Object[] { goreChance })); player.sendMessage(LocaleLoader.getString("Taming.Combat.Chance.Gore", goreChance));
} }
} }
} }

View File

@ -76,23 +76,23 @@ public class UnarmedCommand extends SkillCommand {
luckyEffectsDisplay(); luckyEffectsDisplay();
if (canBerserk) { if (canBerserk) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Unarmed.Effect.0"), LocaleLoader.getString("Unarmed.Effect.1") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.0"), LocaleLoader.getString("Unarmed.Effect.1")));
} }
if (canDisarm) { if (canDisarm) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Unarmed.Effect.2"), LocaleLoader.getString("Unarmed.Effect.3") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.2"), LocaleLoader.getString("Unarmed.Effect.3")));
} }
if (canBonusDamage) { if (canBonusDamage) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Unarmed.Effect.4"), LocaleLoader.getString("Unarmed.Effect.5") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.4"), LocaleLoader.getString("Unarmed.Effect.5")));
} }
if (canDeflect) { if (canDeflect) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Unarmed.Effect.6"), LocaleLoader.getString("Unarmed.Effect.7") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.6"), LocaleLoader.getString("Unarmed.Effect.7")));
} }
if (canIronGrip) { if (canIronGrip) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Unarmed.Effect.8"), LocaleLoader.getString("Unarmed.Effect.9") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Unarmed.Effect.8"), LocaleLoader.getString("Unarmed.Effect.9")));
} }
} }
@ -104,42 +104,42 @@ public class UnarmedCommand extends SkillCommand {
@Override @Override
protected void statsDisplay() { protected void statsDisplay() {
if (canBonusDamage) { if (canBonusDamage) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", new Object[] { LocaleLoader.getString("Unarmed.Ability.Bonus.0"), LocaleLoader.getString("Unarmed.Ability.Bonus.1", new Object[] {ironArmBonus}) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Unarmed.Ability.Bonus.0"), LocaleLoader.getString("Unarmed.Ability.Bonus.1", ironArmBonus)));
} }
if (canDeflect) { if (canDeflect) {
if (isLucky) { if (isLucky) {
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", deflectChance) + LocaleLoader.getString("Perks.lucky.bonus", deflectChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.ArrowDeflect", new Object[] { deflectChance })); player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.ArrowDeflect", deflectChance));
} }
} }
if (canDisarm) { if (canDisarm) {
if (isLucky) { if (isLucky) {
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", disarmChance) + LocaleLoader.getString("Perks.lucky.bonus", disarmChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.Disarm", new Object[] { disarmChance })); player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.Disarm", disarmChance));
} }
} }
if (canIronGrip) { if (canIronGrip) {
if (isLucky) { if (isLucky) {
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.IronGrip", new Object[] { ironGripChance }) + LocaleLoader.getString("Perks.lucky.bonus", new Object[] { ironGripChanceLucky })); player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.IronGrip", ironGripChance) + LocaleLoader.getString("Perks.lucky.bonus", ironGripChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.IronGrip", new Object[] { ironGripChance })); player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Chance.IronGrip", ironGripChance));
} }
} }
if (canBerserk) { if (canBerserk) {
if (hasEndurance) { if (hasEndurance) {
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Berserk.Length", new Object[] { berserkLength }) + LocaleLoader.getString("Perks.activationtime.bonus", new Object[] { berserkLengthEndurance })); player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Berserk.Length", berserkLength) + LocaleLoader.getString("Perks.activationtime.bonus", berserkLengthEndurance));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Berserk.Length", new Object[] { berserkLength })); player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Berserk.Length", berserkLength));
} }
} }
} }

View File

@ -122,11 +122,11 @@ public enum AbilityType {
} }
public String getAbilityPlayer(Player player) { public String getAbilityPlayer(Player player) {
return LocaleLoader.getString(this.abilityPlayer, new Object[] {player.getName()}); return LocaleLoader.getString(this.abilityPlayer, player.getName());
} }
public String getAbilityPlayerOff(Player player) { public String getAbilityPlayerOff(Player player) {
return LocaleLoader.getString(this.abilityPlayerOff, new Object[] {player.getName()}); return LocaleLoader.getString(this.abilityPlayerOff, player.getName());
} }
public String getAbilityRefresh() { public String getAbilityRefresh() {

View File

@ -160,7 +160,7 @@ public class SkillTools {
if (ability.getPermissions(player) && tool.inHand(inHand) && !profile.getToolPreparationMode(tool)) { if (ability.getPermissions(player) && tool.inHand(inHand) && !profile.getToolPreparationMode(tool)) {
if (skill != SkillType.WOODCUTTING && skill != SkillType.AXES) { if (skill != SkillType.WOODCUTTING && skill != SkillType.AXES) {
if (!profile.getAbilityMode(ability) && !cooldownOver(profile.getSkillDATS(ability) * Misc.TIME_CONVERSION_FACTOR, ability.getCooldown(), player)) { if (!profile.getAbilityMode(ability) && !cooldownOver(profile.getSkillDATS(ability) * Misc.TIME_CONVERSION_FACTOR, ability.getCooldown(), player)) {
player.sendMessage(LocaleLoader.getString("Skills.TooTired", new Object[] { calculateTimeLeft(profile.getSkillDATS(ability) * Misc.TIME_CONVERSION_FACTOR, ability.getCooldown(), player) })); player.sendMessage(LocaleLoader.getString("Skills.TooTired", calculateTimeLeft(profile.getSkillDATS(ability) * Misc.TIME_CONVERSION_FACTOR, ability.getCooldown(), player)));
return; return;
} }
} }
@ -252,15 +252,15 @@ public class SkillTools {
/* Update custom titles */ /* Update custom titles */
if (SpoutConfig.getInstance().getShowPowerLevel()) { if (SpoutConfig.getInstance().getShowPowerLevel()) {
spoutPlayer.setTitle(LocaleLoader.getString("Spout.Title", new Object[] {spoutPlayer.getName(), Users.getPlayer(player).getPowerLevel()} )); spoutPlayer.setTitle(LocaleLoader.getString("Spout.Title", spoutPlayer.getName(), Users.getPlayer(player).getPowerLevel()));
} }
} }
else { else {
player.sendMessage(LocaleLoader.getString(capitalized + ".Skillup", new Object[] {String.valueOf(skillups), profile.getSkillLevel(skillType)})); player.sendMessage(LocaleLoader.getString(capitalized + ".Skillup", String.valueOf(skillups), profile.getSkillLevel(skillType)));
} }
} }
else { else {
player.sendMessage(LocaleLoader.getString(capitalized + ".Skillup", new Object[] {String.valueOf(skillups), profile.getSkillLevel(skillType)})); player.sendMessage(LocaleLoader.getString(capitalized + ".Skillup", String.valueOf(skillups), profile.getSkillLevel(skillType)));
} }
} }
@ -432,7 +432,7 @@ public class SkillTools {
*/ */
if (type == SkillType.WOODCUTTING || type == SkillType.AXES) { if (type == SkillType.WOODCUTTING || type == SkillType.AXES) {
if (!profile.getAbilityMode(ability) && !cooldownOver(profile.getSkillDATS(ability) * Misc.TIME_CONVERSION_FACTOR, ability.getCooldown(), player)) { if (!profile.getAbilityMode(ability) && !cooldownOver(profile.getSkillDATS(ability) * Misc.TIME_CONVERSION_FACTOR, ability.getCooldown(), player)) {
player.sendMessage(LocaleLoader.getString("Skills.TooTired", new Object[] { calculateTimeLeft(profile.getSkillDATS(ability) * Misc.TIME_CONVERSION_FACTOR, ability.getCooldown(), player) })); player.sendMessage(LocaleLoader.getString("Skills.TooTired", calculateTimeLeft(profile.getSkillDATS(ability) * Misc.TIME_CONVERSION_FACTOR, ability.getCooldown(), player)));
return; return;
} }
} }

View File

@ -52,15 +52,15 @@ public class WoodcuttingCommand extends SkillCommand {
luckyEffectsDisplay(); luckyEffectsDisplay();
if (canTreeFell) { if (canTreeFell) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Woodcutting.Effect.0"), LocaleLoader.getString("Woodcutting.Effect.1") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Woodcutting.Effect.0"), LocaleLoader.getString("Woodcutting.Effect.1")));
} }
if (canLeafBlow) { if (canLeafBlow) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Woodcutting.Effect.2"), LocaleLoader.getString("Woodcutting.Effect.3") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Woodcutting.Effect.2"), LocaleLoader.getString("Woodcutting.Effect.3")));
} }
if (canDoubleDrop && !Config.getInstance().woodcuttingDoubleDropsDisabled()) { if (canDoubleDrop && !Config.getInstance().woodcuttingDoubleDropsDisabled()) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Woodcutting.Effect.4"), LocaleLoader.getString("Woodcutting.Effect.5") })); player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Woodcutting.Effect.4"), LocaleLoader.getString("Woodcutting.Effect.5")));
} }
} }
@ -75,28 +75,28 @@ public class WoodcuttingCommand extends SkillCommand {
int leafBlowerUnlockLevel = AdvancedConfig.getInstance().getLeafBlowUnlockLevel(); int leafBlowerUnlockLevel = AdvancedConfig.getInstance().getLeafBlowUnlockLevel();
if (skillValue < leafBlowerUnlockLevel) { if (skillValue < leafBlowerUnlockLevel) {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", new Object[] { LocaleLoader.getString("Woodcutting.Ability.Locked.0", new Object[] { leafBlowerUnlockLevel }) })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Woodcutting.Ability.Locked.0", leafBlowerUnlockLevel)));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", new Object[] { LocaleLoader.getString("Woodcutting.Ability.0"), LocaleLoader.getString("Woodcutting.Ability.1") })); player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Woodcutting.Ability.0"), LocaleLoader.getString("Woodcutting.Ability.1")));
} }
} }
if (canDoubleDrop && !Config.getInstance().woodcuttingDoubleDropsDisabled()) { if (canDoubleDrop && !Config.getInstance().woodcuttingDoubleDropsDisabled()) {
if (isLucky) { if (isLucky) {
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", doubleDropChance) + LocaleLoader.getString("Perks.lucky.bonus", doubleDropChanceLucky));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Woodcutting.Ability.Chance.DDrop", new Object[] { doubleDropChance })); player.sendMessage(LocaleLoader.getString("Woodcutting.Ability.Chance.DDrop", doubleDropChance));
} }
} }
if (canTreeFell) { if (canTreeFell) {
if (hasEndurance) { if (hasEndurance) {
player.sendMessage(LocaleLoader.getString("Woodcutting.Ability.Length", new Object[] { treeFellerLength }) + LocaleLoader.getString("Perks.activationtime.bonus", new Object[] { treeFellerLengthEndurance })); player.sendMessage(LocaleLoader.getString("Woodcutting.Ability.Length", treeFellerLength) + LocaleLoader.getString("Perks.activationtime.bonus", treeFellerLengthEndurance));
} }
else { else {
player.sendMessage(LocaleLoader.getString("Woodcutting.Ability.Length", new Object[] { treeFellerLength })); player.sendMessage(LocaleLoader.getString("Woodcutting.Ability.Length", treeFellerLength));
} }
} }
} }

View File

@ -34,7 +34,7 @@ public class SpoutListener implements Listener {
//TODO: Add custom titles based on skills //TODO: Add custom titles based on skills
if (SpoutTools.showPowerLevel) { if (SpoutTools.showPowerLevel) {
spoutPlayer.setTitle(LocaleLoader.getString("Spout.Title", new Object[] {spoutPlayer.getName(), mcMMOPlayer.getPowerLevel()})); spoutPlayer.setTitle(LocaleLoader.getString("Spout.Title", spoutPlayer.getName(), mcMMOPlayer.getPowerLevel()));
} }
profile.setSpoutHud(new SpoutHud(mcMMOPlayer)); //Setup Party HUD stuff profile.setSpoutHud(new SpoutHud(mcMMOPlayer)); //Setup Party HUD stuff

View File

@ -552,7 +552,7 @@ public class SpoutTools {
break; break;
} }
spoutPlayer.sendNotification(LocaleLoader.getString("Spout.LevelUp.1"), LocaleLoader.getString("Spout.LevelUp.2", new Object[] {SkillTools.localizeSkillName(skillType), profile.getSkillLevel(skillType)} ), mat); spoutPlayer.sendNotification(LocaleLoader.getString("Spout.LevelUp.1"), LocaleLoader.getString("Spout.LevelUp.2", SkillTools.localizeSkillName(skillType), profile.getSkillLevel(skillType)), mat);
SpoutSounds.playLevelUpNoise(spoutPlayer, plugin); SpoutSounds.playLevelUpNoise(spoutPlayer, plugin);
} }

View File

@ -17,7 +17,7 @@ import com.gmail.nossr50.util.Users;
public class MchudCommand implements CommandExecutor { public class MchudCommand implements CommandExecutor {
@Override @Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
String usage = LocaleLoader.getString("Commands.Usage.1", new Object[] {"mchud", "<DISABLED | STANDARD | SMALL | RETRO>"}); String usage = LocaleLoader.getString("Commands.Usage.1", "mchud", "<DISABLED | STANDARD | SMALL | RETRO>");
String invalid = LocaleLoader.getString("Commands.mchud.Invalid"); String invalid = LocaleLoader.getString("Commands.mchud.Invalid");
if (CommandHelper.noConsoleUsage(sender)) { if (CommandHelper.noConsoleUsage(sender)) {

View File

@ -20,7 +20,7 @@ import com.gmail.nossr50.util.Users;
public class XplockCommand implements CommandExecutor { public class XplockCommand implements CommandExecutor {
@Override @Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
String usage = LocaleLoader.getString("Commands.Usage.1", new Object[] {"xplock", "[skill]"}); String usage = LocaleLoader.getString("Commands.Usage.1", "xplock", "[skill]");
if (CommandHelper.noConsoleUsage(sender)) { if (CommandHelper.noConsoleUsage(sender)) {
return true; return true;
@ -53,7 +53,7 @@ public class XplockCommand implements CommandExecutor {
if (lastGained != null) { if (lastGained != null) {
spoutHud.toggleXpBarLocked(); spoutHud.toggleXpBarLocked();
spoutHud.setSkillLock(lastGained); spoutHud.setSkillLock(lastGained);
player.sendMessage(LocaleLoader.getString("Commands.xplock.locked", new Object[] { Misc.getCapitalized(lastGained.toString()) })); player.sendMessage(LocaleLoader.getString("Commands.xplock.locked", Misc.getCapitalized(lastGained.toString())));
} }
else { else {
player.sendMessage(usage); player.sendMessage(usage);
@ -68,7 +68,7 @@ public class XplockCommand implements CommandExecutor {
spoutHud.setSkillLock(SkillTools.getSkillType(args[0])); spoutHud.setSkillLock(SkillTools.getSkillType(args[0]));
spoutHud.updateXpBar(); spoutHud.updateXpBar();
player.sendMessage(LocaleLoader.getString("Commands.xplock.locked", new Object[] { Misc.getCapitalized(args[0]) })); player.sendMessage(LocaleLoader.getString("Commands.xplock.locked", Misc.getCapitalized(args[0])));
} }
else { else {
player.sendMessage(LocaleLoader.getString("mcMMO.NoPermission")); player.sendMessage(LocaleLoader.getString("mcMMO.NoPermission"));

View File

@ -35,7 +35,7 @@ public class Menu extends GenericPopup {
escapeLabel.setX(titleLabel.getX() - 15); escapeLabel.setX(titleLabel.getX() - 15);
escapeLabel.setY(titleLabel.getY() + 10); escapeLabel.setY(titleLabel.getY() + 10);
hudButton = new McmmoButton(LocaleLoader.getString("Spout.Menu.HudButton.1", new Object[] {playerProfile.getHudType().toString()}), LocaleLoader.getString("Spout.Menu.HudButton.2")); hudButton = new McmmoButton(LocaleLoader.getString("Spout.Menu.HudButton.1", playerProfile.getHudType().toString()), LocaleLoader.getString("Spout.Menu.HudButton.2"));
hudButton.setWidth(120); hudButton.setWidth(120);
hudButton.setHeight(20); hudButton.setHeight(20);
hudButton.setX(centerX - (hudButton.getWidth() / 2)); hudButton.setX(centerX - (hudButton.getWidth() / 2));

View File

@ -52,10 +52,10 @@ public final class ChimaeraWing {
player.sendMessage(LocaleLoader.getString("Item.ChimaeraWing.Pass")); player.sendMessage(LocaleLoader.getString("Item.ChimaeraWing.Pass"));
} }
else if (!SkillTools.cooldownOver(recentlyHurt, 60, player) && amount >= Config.getInstance().getChimaeraCost()) { else if (!SkillTools.cooldownOver(recentlyHurt, 60, player) && amount >= Config.getInstance().getChimaeraCost()) {
player.sendMessage(LocaleLoader.getString("Item.Injured.Wait", new Object[] {SkillTools.calculateTimeLeft(recentlyHurt, 60, player)})); player.sendMessage(LocaleLoader.getString("Item.Injured.Wait", SkillTools.calculateTimeLeft(recentlyHurt, 60, player)));
} }
else if (amount <= Config.getInstance().getChimaeraCost()) { else if (amount <= Config.getInstance().getChimaeraCost()) {
player.sendMessage(LocaleLoader.getString("Skills.NeedMore", new Object[] { Misc.prettyItemString(Config.getInstance().getChimaeraItemId()) })); player.sendMessage(LocaleLoader.getString("Skills.NeedMore", Misc.prettyItemString(Config.getInstance().getChimaeraItemId())));
} }
} }
} }

View File

@ -74,12 +74,12 @@ public final class Hardcore {
} }
if (totalStolen > 0) { if (totalStolen > 0) {
killer.sendMessage(LocaleLoader.getString("Vampirism.Killer.Success", new Object[] {totalStolen, victim.getName()} )); killer.sendMessage(LocaleLoader.getString("Vampirism.Killer.Success", totalStolen, victim.getName()));
victim.sendMessage(LocaleLoader.getString("Vampirism.Victim.Success", new Object[] {killer.getName(), totalStolen} )); victim.sendMessage(LocaleLoader.getString("Vampirism.Victim.Success", killer.getName(), totalStolen));
} }
else { else {
killer.sendMessage(LocaleLoader.getString("Vampirism.Killer.Failure", new Object[] {victim.getName()} )); killer.sendMessage(LocaleLoader.getString("Vampirism.Killer.Failure", victim.getName()));
victim.sendMessage(LocaleLoader.getString("Vampirism.Victim.Failure", new Object[] {killer.getName()} )); victim.sendMessage(LocaleLoader.getString("Vampirism.Victim.Failure", killer.getName()));
} }
} }
} }

View File

@ -29,7 +29,7 @@ public final class Motd {
* @param version Plugin version * @param version Plugin version
*/ */
public static void displayVersion(Player player, String version) { public static void displayVersion(Player player, String version) {
player.sendMessage(LocaleLoader.getString("MOTD.Version", new Object[] {version})); player.sendMessage(LocaleLoader.getString("MOTD.Version", -213523435 , version));
} }
/** /**
@ -40,12 +40,12 @@ public final class Motd {
if (Hardcore.statLossEnabled) { if (Hardcore.statLossEnabled) {
if (Hardcore.vampirismEnabled) { if (Hardcore.vampirismEnabled) {
player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.VampireOn")); player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.VampireOn"));
player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.Stats", new Object[] {Hardcore.statLossPercentage})); player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.Stats", Hardcore.statLossPercentage));
player.sendMessage(LocaleLoader.getString("MOTD.Vampire.Stats", new Object[] {Hardcore.vampirismStatLeechPercentage})); player.sendMessage(LocaleLoader.getString("MOTD.Vampire.Stats", Hardcore.vampirismStatLeechPercentage));
} }
else { else {
player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.VampireOff")); player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.VampireOff"));
player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.Stats", new Object[] {Hardcore.statLossPercentage })); player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.Stats", Hardcore.statLossPercentage ));
} }
} }
} }
@ -56,19 +56,19 @@ public final class Motd {
*/ */
public static void displayXpPerks(Player player) { public static void displayXpPerks(Player player) {
if (Permissions.xpQuadruple(player)) { if (Permissions.xpQuadruple(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", new Object[] { 4 }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", 4)));
} }
else if (Permissions.xpTriple(player)) { else if (Permissions.xpTriple(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", new Object[] { 3 }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", 3)));
} }
else if (Permissions.xpDoubleAndOneHalf(player)) { else if (Permissions.xpDoubleAndOneHalf(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", new Object[] { 2.5 }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", 2.5)));
} }
else if (Permissions.xpDouble(player)) { else if (Permissions.xpDouble(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", new Object[] { 2 }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", 2)));
} }
else if (Permissions.xpOneAndOneHalf(player)) { else if (Permissions.xpOneAndOneHalf(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", new Object[] { 1.5 }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Perks.xp.name"), LocaleLoader.getString("Perks.xp.desc", 1.5)));
} }
} }
@ -78,13 +78,13 @@ public final class Motd {
*/ */
public static void displayCooldownPerks(Player player) { public static void displayCooldownPerks(Player player) {
if (Permissions.cooldownsHalved(player)) { if (Permissions.cooldownsHalved(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.cooldowns.name"), LocaleLoader.getString("Perks.cooldowns.desc", new Object[] { "1/2" }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Perks.cooldowns.name"), LocaleLoader.getString("Perks.cooldowns.desc", "1/2")));
} }
else if (Permissions.cooldownsThirded(player)) { else if (Permissions.cooldownsThirded(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.cooldowns.name"), LocaleLoader.getString("Perks.cooldowns.desc", new Object[] { "1/3" }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Perks.cooldowns.name"), LocaleLoader.getString("Perks.cooldowns.desc", "1/3")));
} }
else if (Permissions.cooldownsQuartered(player)) { else if (Permissions.cooldownsQuartered(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.cooldowns.name"), LocaleLoader.getString("Perks.cooldowns.desc", new Object[] { "1/4" }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Perks.cooldowns.name"), LocaleLoader.getString("Perks.cooldowns.desc", "1/4")));
} }
} }
@ -94,13 +94,13 @@ public final class Motd {
*/ */
public static void displayActivationPerks(Player player) { public static void displayActivationPerks(Player player) {
if (Permissions.activationTwelve(player)) { if (Permissions.activationTwelve(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.activationtime.name"), LocaleLoader.getString("Perks.activationtime.desc", new Object[] { 12 }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Perks.activationtime.name"), LocaleLoader.getString("Perks.activationtime.desc", 12)));
} }
else if (Permissions.activationEight(player)) { else if (Permissions.activationEight(player)) {
player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Perks.activationtime.name"), LocaleLoader.getString("Perks.activationtime.desc", new Object[] { 8 }) })); player.sendMessage(perkPrefix + LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Perks.activationtime.name"), LocaleLoader.getString("Perks.activationtime.desc", 8)));
} }
else if (Permissions.activationFour(player)) { else if (Permissions.activationFour(player)) {
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", LocaleLoader.getString("Perks.activationtime.name"), LocaleLoader.getString("Perks.activationtime.desc", 4)));
} }
} }
@ -111,7 +111,7 @@ public final class Motd {
public static void displayLuckyPerks(Player player) { public static void displayLuckyPerks(Player player) {
for (SkillType skill : SkillType.values()) { for (SkillType skill : SkillType.values()) {
if (Permissions.lucky(player, skill)) { if (Permissions.lucky(player, skill)) {
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", LocaleLoader.getString("Perks.lucky.name"), LocaleLoader.getString("Perks.lucky.desc.login")));
return; return;
} }
} }
@ -123,6 +123,6 @@ public final class Motd {
* @param website Plugin website * @param website Plugin website
*/ */
public static void displayWebsite(Player player, String website) { public static void displayWebsite(Player player, String website) {
player.sendMessage(LocaleLoader.getString("MOTD.Website", new Object[] {website})); player.sendMessage(LocaleLoader.getString("MOTD.Website", website));
} }
} }