From a612be60aada1f4e931420d9823bc02df40dcbd3 Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Fri, 21 Oct 2022 14:09:17 -0400 Subject: [PATCH] Warn when custom item name begins with a digit --- .../registry/populator/CustomItemRegistryPopulator.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/main/java/org/geysermc/geyser/registry/populator/CustomItemRegistryPopulator.java b/core/src/main/java/org/geysermc/geyser/registry/populator/CustomItemRegistryPopulator.java index 1daa6d28d..94e04e972 100644 --- a/core/src/main/java/org/geysermc/geyser/registry/populator/CustomItemRegistryPopulator.java +++ b/core/src/main/java/org/geysermc/geyser/registry/populator/CustomItemRegistryPopulator.java @@ -66,6 +66,13 @@ public class CustomItemRegistryPopulator { if (!item.customItemOptions().hasCustomItemOptions()) { GeyserImpl.getInstance().getLogger().error("The custom item " + item.name() + " has no registration types"); } + String name = item.name(); + if (name.isEmpty()) { + GeyserImpl.getInstance().getLogger().warning("Custom item name is empty?"); + } else if (Character.isDigit(name.charAt(0))) { + // As of 1.19.31 + GeyserImpl.getInstance().getLogger().warning("Custom item name (" + name + ") begins with a digit. This may cause issues!"); + } return true; }