NamespacedKey - Object From (Expression) — SkBee
Addon: SkBee · Category: Expression · Since: 2.17.0
Syntax
%*classinfo% from key[s] %namespacedkeys/strings%Description
Get an object from a namespaced key. This may come in handy in an instance you have a string version that doesn't match Skript and can't be parsed. Also supports some custom objects such as custom Enchantments in Minecraft 1.21+ Currently supported types: attribute, biome, damage type, enchantment, entity type, game event, item type, particle, potion effect type, statistic, world.
Examples
set {_n} to mc key from "minecraft:zombie"
set {_e} to entity type from key {_n}
set {_e} to entity type from key "armadillo"
set {_e} to entity type from key "minecraft:breeze"
spawn 1 of {_e} above target block
set {_i} to itemtype from key "minecraft:stone_sword"
give player 1 of {_i}
set {_e} to enchantment from key "minecraft:breach"
set {_e} to enchantment from key "custom:my_custom_enchant"
set enchantment level of {_e} of player's tool to 3
set {_e::*} to enchantments from keys "minecraft:sharpness" and "bloop:shiver"