Skip to content

Commit 4bdbbd6

Browse files
authored
Fix null cape causing log spam (#4430)
1 parent 1ef1f46 commit 4bdbbd6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/gregtechceu/gtceu/api/cosmetics/CapeRegistry.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ public static void clearMaps() {
247247
}
248248

249249
@SneakyThrows(CommandSyntaxException.class)
250-
public static void giveRawCape(UUID uuid, @NotNull ResourceLocation cape) {
251-
if (!CapeRegistry.ALL_CAPES.containsKey(cape)) {
250+
public static void giveRawCape(UUID uuid, @Nullable ResourceLocation cape) {
251+
if (cape != null && !CapeRegistry.ALL_CAPES.containsKey(cape)) {
252252
throw ERROR_NO_SUCH_CAPE.create(cape.toString());
253253
}
254254
CURRENT_CAPES.put(uuid, cape);

0 commit comments

Comments
 (0)