mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-19 15:09:19 +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) {
|
if (placeholderArgs.get(1) != null) {
|
||||||
CosmeticSlot slot = CosmeticSlot.valueOf(placeholderArgs.get(1).toUpperCase());
|
CosmeticSlot slot = CosmeticSlot.valueOf(placeholderArgs.get(1).toUpperCase());
|
||||||
if (slot == null) return null;
|
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();
|
if (placeholderArgs.size() == 2) return user.getCosmetic(slot).getId();
|
||||||
|
|
||||||
String output;
|
String output;
|
||||||
@@ -104,6 +104,7 @@ public class HMCPlaceholderExpansion extends PlaceholderExpansion {
|
|||||||
output = user.getCosmetic(slot).getId();
|
output = user.getCosmetic(slot).getId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (output == null) output = "none";
|
||||||
return TranslationUtil.getTranslation("current-cosmetic", output);
|
return TranslationUtil.getTranslation("current-cosmetic", output);
|
||||||
}
|
}
|
||||||
case "unlocked":
|
case "unlocked":
|
||||||
|
|||||||
@@ -11,4 +11,5 @@ using-cosmetic:
|
|||||||
true: "true"
|
true: "true"
|
||||||
false: "false"
|
false: "false"
|
||||||
current-cosmetic:
|
current-cosmetic:
|
||||||
|
no-cosmetic: "No Cosmetic"
|
||||||
none: "none"
|
none: "none"
|
||||||
|
|||||||
Reference in New Issue
Block a user