# IScriptEntity.unlockRotation [← IScriptEntity](index.md) · [← Master](../../wiki.md) Parça 5/17 · [önceki](unlockRotation-4.md) · [sonraki](unlockRotation-6.md) Get item held in off hand. var subject = c.getSubject(); var item = subject.getOffItem(); // Lightning bolt admin stick (but in off hand) idk I didn't play on servers if (item.getItem().getId() === "minecraft:stick") { c.executeCommand("/summon lightning_bolt ~ ~ ~"); } setOffItem void setOffItem(IScriptItemStack stack) Set item held in off hand. c.getSubject().setOffItem(mappet.createItem("minecraft:shield")); giveItem void giveItem(IScriptItemStack stack) Give item to this entity. (like the /give command) c.getSubject().giveItem(mappet.createItem("minecraft:diamond", 64)); giveItem void giveItem(IScriptItemStack stack, boolean playSound, boolean dropIfInventoryFull) Give item to this entity. (like the /give command) c.getSubject().giveItem(mappet.createItem("minecraft:diamond", 64), false, true); getHelmet IScriptItemStack getHelmet() Return the entity's helmet's item stack. c.send( c.getSubject().getHelmet().serialize() ) getChestplate IScriptItemStack getChestplate() Return the entity's chestplate's item stack. c.send( c.getSubject().getChestplate().serialize() ) getLeggings IScriptItemStack getLeggings() Return the entity's leggings' item stack. c.send( c.getSubject().getLeggings().serialize() ) getBoots IScriptItemStack getBoots() Return the entity's boots' item stack. c.send( c.getSubject().getBoots().serialize() ) setHelmet void setHelmet(IScriptItemStack itemStack) Set the entity's helemt. var item = mappet.createItemNBT(mappet.createCompound("{id:\"minecraft:diamond_helmet\",Count:1b,tag:{ench:[{lvl:3s,id:0s}],RepairCost:1},Damage:0s}")); c.getSubject().setHelmet(item) setChestplate