Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
api:start [2019/10/21 16:33]
indyuce
api:start [2020/07/01 03:13] (current)
Line 1: Line 1:
 +======Plugin API======
 ===== Checking if an ItemStack is from MI===== ===== Checking if an ItemStack is from MI=====
 First, get the NBTItem of your ItemStack using ''​NBTItem.get(ItemStack)''​. This class lets you manipulate NBTTags from your item easily (1.14 has a new API which lets you do that using the ItemMeta, but for <1.14 support MI handles NBTs using NMS code). Use ''​nbtItem.hasType()''​ to see if the NBTItem can find the tag which corresponds to an MMOItems type. This method basically checks whether or not the plugin is from MI. First, get the NBTItem of your ItemStack using ''​NBTItem.get(ItemStack)''​. This class lets you manipulate NBTTags from your item easily (1.14 has a new API which lets you do that using the ItemMeta, but for <1.14 support MI handles NBTs using NMS code). Use ''​nbtItem.hasType()''​ to see if the NBTItem can find the tag which corresponds to an MMOItems type. This method basically checks whether or not the plugin is from MI.

api/start.1571675631.txt.gz · Last modified: 2020/07/01 03:13 (external edit)