9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-23 08:59:20 +00:00

feat: add wardrobes to internal map

This commit is contained in:
LoJoSho
2023-05-24 15:03:23 -05:00
parent a92b4c15f5
commit 7fcbbd6b5a

View File

@@ -143,7 +143,7 @@ public class WardrobeSettings {
if (!wardrobesNode.node(DISTANCE_PATH).virtual()) distance = wardrobesNode.node(DISTANCE_PATH).getInt();
Wardrobe wardrobe = new Wardrobe(id, wardrobeLocation, permission, distance);
wardrobes.put(id, wardrobe);
addWardrobe(wardrobe);
} catch (Exception e) {
MessagesUtil.sendDebugMessages("Unable to create wardrobe " + id, Level.SEVERE);
}
@@ -210,6 +210,10 @@ public class WardrobeSettings {
return wardrobes.values();
}
public static void addWardrobe(Wardrobe wardrobe) {
wardrobes.put(wardrobe.getId(), wardrobe);
}
@Deprecated
public static boolean inDistanceOfWardrobe(final Location wardrobeLocation, final Location playerLocation) {
if (displayRadius == -1) return true;