Language improvements.

This commit is contained in:
Brianna 2019-08-04 23:56:38 -04:00
parent ded67639ae
commit 5a4da0057e
6 changed files with 27 additions and 27 deletions

View File

@ -70,7 +70,7 @@ public class CommandGiveBook extends AbstractCommand {
if (level != -1 && (level > enchant.getMaxLevel() || level < 1)) {
instance.getLocale().getMessage("command.book." + (level > enchant.getMaxLevel() ? "maxlevel" : "minlevel"))
.processPlaceholder("enchant", enchant.getIdentifier())
.processPlaceholder("maxlevel", enchant.getMaxLevel())
.processPlaceholder("max_level", enchant.getMaxLevel())
.sendPrefixedMessage(sender);
return ReturnType.SUCCESS;
}

View File

@ -273,8 +273,8 @@ public class AlchemistMenu extends FastInv {
instance.getEconomy().withdrawBalance(event.getPlayer(), ecoCost);
changeExp(event.getPlayer(), -expCost);
instance.getLocale().getMessage("alchemist.success")
.processPlaceholder("ecocost", ecoCost)
.processPlaceholder("expcost", expCost)
.processPlaceholder("eco_cost", ecoCost)
.processPlaceholder("exp_cost", expCost)
.sendPrefixedMessage(event.getPlayer());
event.getPlayer().getInventory().addItem(getInventory().getItem(PREVIEW_SLOT));

View File

@ -58,10 +58,10 @@ public class EnchanterMenu extends FastInv {
instance.getEconomy().withdrawBalance(player, ecoCost);
instance.getLocale().getMessage("enchanter.success")
.processPlaceholder("groupname", group.getName())
.processPlaceholder("groupcolor", group.getColor())
.processPlaceholder("ecocost", ecoCost)
.processPlaceholder("expcost", expCost)
.processPlaceholder("group_name", group.getName())
.processPlaceholder("group_color", group.getColor())
.processPlaceholder("eco_cost", ecoCost)
.processPlaceholder("exp_cost", expCost)
.sendPrefixedMessage(player);
changeExp(player, -expCost);

View File

@ -112,7 +112,7 @@ public class Message {
* @return the modified Message
*/
public Message processPlaceholder(String placeholder, Object replacement) {
this.message = message.replace("%" + placeholder + "%", replacement.toString());
this.message = message.replace("{" + placeholder + "}", replacement.toString());
return this;
}

View File

@ -3,39 +3,39 @@
general.nametag.prefix = "&8[&6EpicEnchants&8]"
#Command Messages
command.book.received = "&7You have been given a &6%enchant% &7book."
command.book.gave = "&7You gave &6%player% &7an &6%enchant% &7book."
command.book.maxlevel = "&cThe max level for &4%enchant% &cis &4%maxlevel%&c."
command.book.minlevel = "&cThe min level for &4%enchant% &cis &41&c."
command.book.received = "&7You have been given a &6{enchant} &7book."
command.book.gave = "&7You gave &6{player} &7an &6{enchant} &7book."
command.book.maxlevel = "&cThe max level for &4{enchant} &cis &4{max_level}&c."
command.book.minlevel = "&cThe min level for &4{enchant} &cis &41&c."
command.whitescroll.received = "&7You have been given a whitescroll."
command.whitescroll.gave = "&7You gave &6%player% &7a whitescroll."
command.whitescroll.gave = "&7You gave &6{player} &7a whitescroll."
command.apply.invaliditem = "&cYou cannot apply &4%enchant% &cto this item."
command.apply.invaliditem = "&cYou cannot apply &4{enchant} &cto this item."
command.reload = "&7Configuration files reloaded."
command.giveunknown = "&cUnknown item to give &4%unknown%&c."
command.giveunknown = "&cUnknown item to give &4{unknown}&c."
command.dust.gave = "&7Gave &6%amount% %group% &7to &6%player%&7."
command.dust.received = "&7You have received &6%amount% %group%&7."
command.dust.gave = "&7Gave &6{amount} {group} &7to &6{player}&7."
command.dust.received = "&7You have received &6{amount} {group}&7."
#Event Messages
blackscroll.success = "&7Successfully blackscrolled &6%groupcolor%%enchant% %level%&7."
blackscroll.success = "&7Successfully blackscrolled &6{group_color}{enchant} {level}&7."
blackscroll.noenchants = "&cNo enchants to blackscroll."
whitescroll.alreadyapplied = "&cThis item is already protected!"
whitescroll.applied = "&7This item is now protected!"
enchanter.cannotafford = "&cYou cannot afford this purchase."
enchanter.success = "&7Purchased &6%group_color%%group_name% &7book for &6%exp_cost% experience&7."
enchanter.success = "&7Purchased &6{group_color}{group_name} &7book for &6{exp_cost} experience&7."
tinkerer.open = "&7Trading with the tinkerer."
tinkerer.cancelled = "&cCancelled."
tinkerer.accepted = "&7Accepted."
tinkerer.noitems = "&cThe tinkerer is not interested in any of your items..."
tinkerer.depositedall = "&7Deposited %amount% items."
tinkerer.depositedall = "&7Deposited {amount} items."
alchemist.maxtwoitems = "&cYou may only combine &42 &citems at once..."
alchemist.notinterested = "&cThe alchemist is not interested in any of your items..."
@ -46,15 +46,15 @@ alchemist.differentenchantment = "&cThe alchemist can only combine books with th
alchemist.differentlevels = "&cThe alchemist can only combine books of the same level..."
alchemist.differentgroups = "&cThe alchemist can only combine dust of the same group..."
alchemist.cannotafford = "&cYou cannot afford this exchange..."
alchemist.success = "&7Exchanged for &6%expcost% &7experience."
alchemist.success = "&7Exchanged for &6{exp_cost} &7experience."
enchants.invalidmaterial = "&cYou can not apply &4%enchant% &cto that item..."
enchants.failure = "&4%enchant% &cfailed to apply..."
enchants.brokenfailure = "&4%enchant% &cfailed to apply and broke your item..."
enchants.invalidmaterial = "&cYou can not apply &4{enchant} &cto that item..."
enchants.failure = "&4{enchant} &cfailed to apply..."
enchants.brokenfailure = "&4{enchant} &cfailed to apply and broke your item..."
enchants.conflict = "&cYou cannot apply this enchant as it conflicts with another enchant..."
enchants.maxedout = "&cYou already have that enchant maxed out on this item..."
enchants.alreadyapplied = "&cYou already have that enchant applied on this item."
enchants.protected = "&7This book would have broken your item, luckily it was protected!"
enchants.success = "&7You have successfully applied &6%enchant%&7."
enchants.success = "&7You have successfully applied &6{enchant}&7."
book.discover = "&7You examine the &6%group_color%%group_name% &7Enchantment Book, and discover &6%enchantformat%&7!"
book.discover = "&7You examine the &6{group_color}{group_name} &7Enchantment Book, and discover &6{enchant_format}&7!"

View File

@ -1,5 +1,5 @@
# The enchant identifier must be unique.
identifier: Skill Swipe
identifier: SkillSwipe
# The max level for this enchant.
max-level: 5