Appendix D. Items Reference

The items module provides a suite of useful functions for creating item stacks, which are collections of objects that are typically stored in a player’s inventory. Each of the functions in this appendix can be called in three ways:

Image If there is no parameter supplied, the function will return the equivalent material, that is, one of the values of the net.canarymod.api.inventory.ItemType type. For example, calling items.diamondOre() will return the net.canarymod.api.inventory.ItemType.DiamondOre value, which can be used anywhere the CanaryMod API expects a net.canarymod.api.inventory.ItemType object.

If a number is supplied ...

Get A Beginner’s Guide to Writing Minecraft Plugins in JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.