This is my code.
String id = “minecraft:paper”;
ItemType itemType = ItemTypes.registry().findValue(ResourceKey.resolve(id)).get();
This is error.
org.spongepowered.api.registry.ValueNotFoundException: No ‘minecraft:item’ registry has been defined in root ‘minecraft:root’
Why I can’t get Item Type by String on Starting Plugin ?
Please send me an example code to get ItemType by id on starting plugin.
Please help me.