legality sign||doc135653

September 20, 2022


  • The class to which the function belongs:item


Determine whether the item data exists.

Value Returned

type Description
boolean Does the data exist

Code Samples

On the server side of the player entity templatemount script, add the error when the registered player switches hand-held itemCallback, if the item data exists, output its configuration name

Trigger.addHandler(this:cfg(), "HAND_ITEM_CHANGED", function(context)
    local entity = context.obj1
    local newItem = context.item
    if not newItem:null() then