3
0
Mirror von https://github.com/TheSilentPro/HeadDB.git synchronisiert 2024-12-28 03:40:06 +01:00

Localize some economy messages

Dieser Commit ist enthalten in:
Altruiis 2022-02-16 18:30:18 -08:00
Ursprung ba556ec942
Commit 04d5f28431
2 geänderte Dateien mit 8 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -312,7 +312,7 @@ public class InventoryUtils {
// If economy is disabled or no plugin is present, the item is free. // If economy is disabled or no plugin is present, the item is free.
// Don't mention receiving it for free in this case, since it is always free. // Don't mention receiving it for free in this case, since it is always free.
if (economy == null) { if (economy == null) {
Utils.sendMessage(player, String.format("&7You received &e%d &7x &e%s&7!", amount, description)); Utils.sendMessage(player, String.format(localization.getMessage("noEconomy"), amount, description));
Utils.playSound(player, "noEconomy"); Utils.playSound(player, "noEconomy");
return true; return true;
} }
@ -323,17 +323,17 @@ public class InventoryUtils {
if (cost > 0) { if (cost > 0) {
if (economy.has(player, cost)) { if (economy.has(player, cost)) {
economy.withdrawPlayer(player, cost); economy.withdrawPlayer(player, cost);
Utils.sendMessage(player, String.format("&7You purchased &e%d &7x &e%s &7for &e%.2f&7!", amount, description, cost)); Utils.sendMessage(player, String.format(localization.getMessage("purchasedHead"), amount, description, cost));
Utils.playSound(player, "paid"); Utils.playSound(player, "paid");
return true; return true;
} }
Utils.sendMessage(player, String.format("&cYou do not have enough to purchase &e%d &cx &e%s&7.", amount, description)); Utils.sendMessage(player, String.format(localization.getMessage("notEnoughMoney"), amount, description));
Utils.playSound(player, "unavailable"); Utils.playSound(player, "unavailable");
return false; return false;
} }
// Otherwise, the item is free. // Otherwise, the item is free.
Utils.sendMessage(player, String.format("&7You received &e%d &7x &e%s &7for &efree&7!", amount, description)); Utils.sendMessage(player, String.format(localization.getMessage("free"), amount, description));
Utils.playSound(player, "free"); Utils.playSound(player, "free");
return true; return true;
} }

Datei anzeigen

@ -3,6 +3,10 @@ onlyPlayers: "&cOnly players may open the database."
databaseOpen: "&7Opening &cHead Database" databaseOpen: "&7Opening &cHead Database"
invalidPlayer: "&cPlayer is not online!" invalidPlayer: "&cPlayer is not online!"
localFavorites: "&cLocal heads can not be added to favorites!" localFavorites: "&cLocal heads can not be added to favorites!"
noEconomy: "&7You received &e%d &7x &e%s&7!"
purchasedHead: "&7You purchased &e%d &7x &e%s &7for &e%.2f&7!"
notEnoughMoney: "&cYou do not have enough to purchase &e%d &cx &e%s&7."
free: "&7You received &e%d &7x &e%s &7for &efree&7!"
menu: menu:
main: "&c&lHeadDB &7(%size%)" main: "&c&lHeadDB &7(%size%)"