mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Warn when custom item name begins with a digit
This commit is contained in:
parent
e8764c6a81
commit
a612be60aa
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue