Skip to content

Auto converter

Anarchick edited this page Apr 7, 2024 · 22 revisions

Skript-Packet has an auto converter. This mean that even if a field need an nms object : Skript-Packet will try to convert a Bukkit object to an nms object !

    set field 1 of {_packet} to nms from location of {_block}
# OR
    set field 1 of {_packet} to {_block} # Auto-Converter

This is the list of Auto-Converters between packet field and input value (prefix by * means not NMS field):

NMS FIELD CLASS INPUT TYPE More informations
BlockPosition %location/entity/vector/block%
ItemStack %itemstack/itemtype/slot/block/bockdata% + *Material Bukkit Mateterial see ExprBukkitMaterial
Entity %entity%
*Boolean %boolean%
*Number %number/biome/entity% Get the entity id / biome id
*Number Array %numbers%
*UUID %string/entity%
NBTTagCompound %string% I recommand skBee to get NBT of blocks/entities
WorldServer %world%
IBlockData %itemtype/block% IblockData is like Material
*List %objects% Convert everything to an ArrayList if needed
*Enum %string% Get the enum by his EXACT name
*BaseComponent %string%
IChatBaseComponent %string%
DataWatcher %datawatcher% Auto-convert ProtocolLib DataWatcher to NMS DataWatcher
MinecraftKey instance of Keyed
*Paper Component %string% Use the MiniMessage format
*Optional %object%
*Set %objects% Convert everything to a Set if needed
EntityTypes %entitytype/entity/string/% %entitytype% Skript issue
Clone this wiki locally