Découvrez les expressions grâce à nos tutoriels pour débuter avec Skript. Pour toutes vos questions, rendez vous sur le forum ou sur Discord !
Voir les tutos J'ai besoin d'aideBlock Cuboid (bloc cuboïde)
Description
Tous les blocs présents dans une région cuboïde défini par deux points.
set {_blocks::*} to all blocks within {_loc1} and {_loc2}
set all blocks within {_loc1} and {_loc2} to stone
loop all blocks within {_loc1} and {_loc2}:
if loop-block is stone:
set loop-block to grass
[(all [[of] the]|the)] blocks within %location% and %location%
Block Data - Block (données d'un bloc)
Description
Obtenir toutes les données d'un bloc, comme les tags, strings et data. Vous pouvez aussi définir les données ou les tags d'un bloc. Attention : Cette syntaxe est uniquement disponible pour les serveurs 1.13 + !
set {_data} to block data of target block of player
set {_data::*} to block data tags of target block of player
set {_water} to block data tag "waterlogged" of event-block
set block data of target block to "minecraft:carrots[age=7]"
set block data tag "waterlogged" of event-block to true
[the] block[ ]data [(tags|tag %string%)] of %blocks%
%blocks%'[s] block[ ]data [(tags|tag %string%)]
Block Data - Item (données d'un item)
Description
Obtenir toutes les données d'un item, comme les tags, strings et data. Vous pouvez aussi définir les données ou les tags d'un item. Attention : Cette syntaxe est uniquement disponible pour les serveurs 1.14 + !
set item data of player's tool to block data of target block
set item data of player's tool to "minecraft:campfire[lit=false,waterlogged=true]"
set item data tag "lit" of player's tool to false
[the] item [block[ ]]data [(tags|tag %string%)] of %itemtypes%
%itemtypes%'[s] item [block[ ]]data [(tags|tag %string%)]
Bound - At Location (région à une position)
Description
Retourne toutes les régions et leur identifiant selon une position.
set {_bounds::*} to bounds at player
set {_b::*} to bound ids at player
loop all bounds at player:
[(all [[of] the]|the)] bound[s] at %location%
[(all [[of] the]|the)] bound id[s] at %location%
Bound - Blocks (blocs dans une région)
Description
Retourne tous les blocs présents dans une région.
set {_blocks::*} to all blocks within bound {bound}
set all blocks within {bound} to stone
loop all blocks within bound {bound}:
if loop-block is stone:
set loop-block to grass
[(all [[of] the]|the)] blocks within [bound] %bound%
Bound - Coords (coordonnées d'une région)
Description
Retourne les coordonnées et le monde d'une région. Vous pouvez récupérer le monde et les coordonnées d'une région spécifique, vous pouvez aussi définir les coordonnées d'une région. Vous ne pouvez pas définir le monde d'une région.
Le plus petit sera toujours égal au coin sud-est, tandis que le le plus grand sera toujours égal au coin nord-ouest inférieur.
set lesser y coord of {bound} to 10
set {_x} to greater x coord of bound with id "my.bound"
lesser (x|y|z) coord[inate] of [bound] %bound%
greater (x|y|z) coord[inate] of [bound] %bound%
world of bound %bound%
Bound - From ID (région par son identifiant)
Description
Retourne une région par rapport à son identifiant.
set {_b} to bound from id "%player%.home"
bound (of|from|with) id %string%
Entity NoClip (mode spectateur d'une entité)
Description
Modifie ou retourne le statut spectateur d'une entité. Attention : cette syntaxe ne marchera pas sur des joueurs.
spawn a zombie at player
set no clip state of last spawned zombie to true
set {_var} to no clip state of last spawned sheep
loop all entities in radius 5 around player:
set no clip state of loop-entity to true
push loop-entity up with speed 5
no[( |-)]clip (state|mode) of %entities%
%entities%'s no[( |-)]clip (state|mode)
EntityBlockStorage - Entity Count (nombre d'entités)
Description
Retourne le nombre d'entités actuellement stockées dans les données d'un bloc.
Cette syntaxe ne comprend que les ruches ou nids d'abeille, fonctionnel uniquement avec les serveurs 1.15.2 + !
if amount of stored entities in block at player > 10:
set {_a} to size of entities stored in event-block
(size|amount) of [all] (stored entities|entities stored) in %blocks%
EntityBlockStorage - Max Entities (entités d'un bloc maximum)
Description
Modifier ou retourner le contenu maximal d'un bloc pouvant accueillir des données d'entités. Cette syntaxe ne comprend que les ruches ou nids d'abeille, fonctionnel uniquement avec les serveurs 1.15.2 + !
set {_m} to max entities of target block of player
set max entities of target block of player to 20
set max entity storage of event-block to 5
[the] max entit(ies|y storage) of %blocks%
%blocks%'[s] max entit(ies|y storage)
Inventory Name (nom d'un inventaire)
Description
Ceci est un moyen secondaire pour l'expression de Skript, étant cassées depuis la 1.14 +.
if inventory name of current inventory of player = "Settings":
[the] (custom|inv[entory]) name of %inventories%
%inventories%'[s] (custom|inv[entory]) name
NBT - Item with NBT (item avec NBT)
Description
Distribue à un joueur un item avec NBT ou utiliser des NBT dans un GUI.
give player diamond sword with nbt "{Unbreakable:1}"
format gui slot 1 of player with diamond axe with nbt "{Enchantments:[{id:\"\"unbreaking\"\",lvl:5s}]}"
%itemtype% with [item( |-)]nbt %string%
NBT - Item/Entity/Block (NBT d'un item, entité, bloc)
Description
NBT d'item, entités, tile entités (comme les fours, entonnoirs, alambique, bannière ...) ou fichiers. Supporte l'ajout, suppresion, retour et la réinitialisation. La réinitialisation ne marchera que sur des items, et non sur des entités ou des blocs.
set {_nbt} to nbt of player's tool
add "{Enchantments:[{id:""sharpness"",lvl:5}]}" to nbt of player's tool
reset nbt of player's tool
set {_nbt} to nbt of target entity
set {_nbt} to event-entity
add "{CustomName:""{\""text\"":\""&bMyNewName\""}""}" to target entity
add "{RequiredPlayerRange:0s}" to targeted block's nbt
add "{SpawnData:{id:""minecraft:wither""}}" to nbt of clicked block
set {_nbt} to file-nbt of "world/playerdata/some-uuid-here.dat"
[the] [(entity|item|block|tile[(-| )]entity|file)(-| )]nbt of %block/entity/itemstack/itemtype/string%
%block/entity/itemstack/itemtype/string%'[s] [(entity|item|block|tile[(-| )]entity|file)(-| )]nbt
NBT - Tag
Description
Renvoie la valeur de la balise spécifiée du NBT spécifié. Prend également en charge l'obtention de balises imbriquées en utilisant un point-virgule comme délimiteur. Si la valeur de retour est une liste, vous pouvez l'utiliser comme une liste, car elle sera divisée automatiquement pour vous. Actuellement, seuls les retours sont pris en charge : l'ensemble pourrait être disponible à l'avenir.
set {_tag} to tag "Invulnerable" of targeted entity's nbt
send "Tag: %tag ""CustomName"" of nbt of target entity%" to player
set {_tag} to "Enchantments" tag of nbt of player's tool
set {_tag} to "BlockEntityTag;Items" tag of nbt of target block
tag %string% of %string%
%string% tag of %string%
Stored Enchantments (enchantement stocké)
Description
Modifier ou retourner l'enchantement contenu d'un livre.
set {_a::*} to stored enchants of player's tool
set stored enchants of player's tool to sharpness 3 and unbreaking 2
add sharpness 1 to stored enchants of player's tool
delete stored enchants of player's tool
remove sharpness from stored enchants of player's tool
[the] stored enchant[ment]s of %itemtypes%
%itemtypes%'[s] stored enchant[ment]s