3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-07-06 05:18:06 +02:00

Warn when custom item name begins with a digit

Dieser Commit ist enthalten in:
Camotoy 2022-10-21 14:09:17 -04:00
Ursprung e8764c6a81
Commit a612be60aa
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F

Datei anzeigen

@ -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;
}