From e9c79463192ac5278536162f0bb07c6cefed9dc9 Mon Sep 17 00:00:00 2001 From: LoJoSho Date: Wed, 24 May 2023 15:05:13 -0500 Subject: [PATCH] feat: create new wardrobes in-game --- .../hibiscusmc/hmccosmetics/command/CosmeticCommand.java | 7 +++++-- common/src/main/resources/messages.yml | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/hibiscusmc/hmccosmetics/command/CosmeticCommand.java b/common/src/main/java/com/hibiscusmc/hmccosmetics/command/CosmeticCommand.java index 1d576c0e..e0df47de 100644 --- a/common/src/main/java/com/hibiscusmc/hmccosmetics/command/CosmeticCommand.java +++ b/common/src/main/java/com/hibiscusmc/hmccosmetics/command/CosmeticCommand.java @@ -3,6 +3,7 @@ package com.hibiscusmc.hmccosmetics.command; import com.hibiscusmc.hmccosmetics.HMCCosmeticsPlugin; import com.hibiscusmc.hmccosmetics.config.Settings; import com.hibiscusmc.hmccosmetics.config.Wardrobe; +import com.hibiscusmc.hmccosmetics.config.WardrobeLocation; import com.hibiscusmc.hmccosmetics.config.WardrobeSettings; import com.hibiscusmc.hmccosmetics.cosmetic.Cosmetic; import com.hibiscusmc.hmccosmetics.cosmetic.CosmeticSlot; @@ -320,8 +321,10 @@ public class CosmeticCommand implements CommandExecutor { } Wardrobe wardrobe = WardrobeSettings.getWardrobe(args[1]); if (wardrobe == null) { - MessagesUtil.sendMessage(player, "no-wardrobes"); - return true; + wardrobe = new Wardrobe(args[1], new WardrobeLocation(null, null, null), null, -1); + WardrobeSettings.addWardrobe(wardrobe); + //MessagesUtil.sendMessage(player, "no-wardrobes"); + //return true; } if (args[2].equalsIgnoreCase("npclocation")) { diff --git a/common/src/main/resources/messages.yml b/common/src/main/resources/messages.yml index c14ac1fa..ca862e4a 100644 --- a/common/src/main/resources/messages.yml +++ b/common/src/main/resources/messages.yml @@ -12,6 +12,7 @@ set-wardrobe-location: "%prefix% Set new wardrobe loca set-wardrobe-viewing: "%prefix% Set new wardrobe viewing location!" set-wardrobe-leaving: "%prefix% Set new wardrobe leaving location!" no-wardrobes: "%prefix% There are no wardrobes with that name!" +wardrobe-not-setup: "%prefix% This wardrobe does not have all required locations set!" equip-cosmetic: "%prefix% You have equipped !" unequip-cosmetic: "%prefix% You have unequipped !"