Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Item getItemByText(ICommandSender sender, String id) throws NumberInvalidException
- {
- ResourceLocation resourcelocation = new ResourceLocation(id);
- Item item = (Item)Item.itemRegistry.getObject(resourcelocation);
- if (item == null)
- {
- throw new NumberInvalidException("commands.give.notFound", new Object[] {resourcelocation});
- }
- else
- {
- return item;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement