mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-20 15:39:16 +00:00
feat: define no-cosmetic and none differently in translations
This commit is contained in:
@@ -80,7 +80,7 @@ public class HMCPlaceholderExpansion extends PlaceholderExpansion {
|
||||
if (placeholderArgs.get(1) != null) {
|
||||
CosmeticSlot slot = CosmeticSlot.valueOf(placeholderArgs.get(1).toUpperCase());
|
||||
if (slot == null) return null;
|
||||
if (user.getCosmetic(slot) == null) return "none";
|
||||
if (user.getCosmetic(slot) == null) return TranslationUtil.getTranslation("current-cosmetic", "no-cosmetic");
|
||||
if (placeholderArgs.size() == 2) return user.getCosmetic(slot).getId();
|
||||
|
||||
String output;
|
||||
@@ -104,6 +104,7 @@ public class HMCPlaceholderExpansion extends PlaceholderExpansion {
|
||||
output = user.getCosmetic(slot).getId();
|
||||
}
|
||||
}
|
||||
if (output == null) output = "none";
|
||||
return TranslationUtil.getTranslation("current-cosmetic", output);
|
||||
}
|
||||
case "unlocked":
|
||||
|
||||
@@ -11,4 +11,5 @@ using-cosmetic:
|
||||
true: "true"
|
||||
false: "false"
|
||||
current-cosmetic:
|
||||
no-cosmetic: "No Cosmetic"
|
||||
none: "none"
|
||||
|
||||
Reference in New Issue
Block a user