diff --git a/features/category/src/main/java/net/okocraft/box/feature/category/internal/category/defaults/DefaultCategories.java b/features/category/src/main/java/net/okocraft/box/feature/category/internal/category/defaults/DefaultCategories.java index 072e3eff61..e8007c2d4f 100644 --- a/features/category/src/main/java/net/okocraft/box/feature/category/internal/category/defaults/DefaultCategories.java +++ b/features/category/src/main/java/net/okocraft/box/feature/category/internal/category/defaults/DefaultCategories.java @@ -120,7 +120,7 @@ static List collectCurrentDefaultCategories(@NotNull ItemVersio DefaultCategory.builder().key("armors").icon(Material.LEATHER_HELMET).items(categorizedItemMap.get("armors")).addDefaultDisplayName("Armors").addDisplayName(JAPANESE, "防具").build(), DefaultCategory.builder().key("enchanted-books").icon(Material.ENCHANTED_BOOK).items(categorizedItemMap.get("enchanted-books")).addDefaultDisplayName("Enchanted Books").addDisplayName(JAPANESE, "エンチャント本").build(), DefaultCategory.builder().key("potions").icon(Material.POTION).items(categorizedItemMap.get("potions")).addDefaultDisplayName("Potions").addDisplayName(JAPANESE, "ポーション").build(), - DefaultCategory.builder().key("horse").icon(Material.SADDLE).items(categorizedItemMap.get("horse")).addDefaultDisplayName("Horse").addDisplayName(JAPANESE, "馬").build(), + DefaultCategory.builder().key("mob-equipment").icon(Material.SADDLE).items(categorizedItemMap.get("horse")).addDefaultDisplayName("Mob Equipment").addDisplayName(JAPANESE, "モブ用装備").build(), DefaultCategory.builder().key("music-discs").icon(Material.MUSIC_DISC_CAT).items(categorizedItemMap.get("music-discs")).addDefaultDisplayName("Music Discs").addDisplayName(JAPANESE, "ディスク").build(), DefaultCategory.builder().key("spawn-eggs").icon(Material.COW_SPAWN_EGG).items(categorizedItemMap.get("spawn-eggs")).addDefaultDisplayName("Spawn Eggs").addDisplayName(JAPANESE, "スポーンエッグ").build(), DefaultCategory.builder().key("unavailable").icon(Material.BEDROCK).items(categorizedItemMap.get("unavailable")).addDefaultDisplayName("Unavailable").addDisplayName(JAPANESE, "入手不可").build() diff --git a/features/category/src/main/java/net/okocraft/box/feature/category/internal/file/CategoryFile.java b/features/category/src/main/java/net/okocraft/box/feature/category/internal/file/CategoryFile.java index eac49beed4..0a5cfee201 100644 --- a/features/category/src/main/java/net/okocraft/box/feature/category/internal/file/CategoryFile.java +++ b/features/category/src/main/java/net/okocraft/box/feature/category/internal/file/CategoryFile.java @@ -210,10 +210,11 @@ private void loadAndRegisterCategory(@NotNull String key, @NotNull MapNode sourc } private static Object renameKey(@NotNull Object key) { - if (key.equals("woods")) { - return "woods-1"; - } - return key; + return switch (String.valueOf(key)) { + case "woods" -> "woods-1"; + case "horse" -> "mob-equipment"; + default -> key; + }; } private static void addDefaultDisplayName(@NotNull String key, @NotNull MapNode target) { @@ -233,7 +234,7 @@ private static void addDefaultDisplayName(@NotNull String key, @NotNull MapNode case "farms" -> Map.of(LOCALE_DEFAULT, "Farms", "ja", "農業・食料"); case "flowers" -> Map.of(LOCALE_DEFAULT, "Flowers", "ja", "草花"); case "glasses" -> Map.of(LOCALE_DEFAULT, "Glasses", "ja", "ガラス"); - case "horse" -> Map.of(LOCALE_DEFAULT, "Horse", "ja", "馬"); + case "horse" -> Map.of(LOCALE_DEFAULT, "Mob Equipment", "ja", "モブ用装備"); case "misc" -> Map.of(LOCALE_DEFAULT, "Misc", "ja", "その他"); case "mob-drops" -> Map.of(LOCALE_DEFAULT, "Mob Drops", "ja", "モブドロップ品"); case "mushrooms" -> Map.of(LOCALE_DEFAULT, "Mushrooms", "ja", "きのこ"); diff --git a/features/category/src/main/resources/default_categories.yml b/features/category/src/main/resources/default_categories.yml index 6cb239b89a..04cc2dbc49 100644 --- a/features/category/src/main/resources/default_categories.yml +++ b/features/category/src/main/resources/default_categories.yml @@ -1378,7 +1378,7 @@ potions: - LINGERING_POTION_LONG_WATER_BREATHING - LINGERING_POTION_WEAKNESS - LINGERING_POTION_LONG_WEAKNESS -horse: +mob-equipment: - SADDLE - LEATHER_HORSE_ARMOR - IRON_HORSE_ARMOR