Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Documentation

Tuke_Nuke edited this page Aug 3, 2017 · 7 revisions

TuSKe Documentation

This is a documentation that will be updated every new release and/or when some changes are made. This is a working in progress, there is much things to do until SkUnity Docs 2.0, where it will be updated automatically too

Current progress:

  • All general syntaxes.
  • Separate syntaxes by events, conditions, effects...
  • Include the syntaxes of plugin hooks and separate them by sections for each one.
  • An easy and readable syntax format.
  • Show some details of a syntax, such as return type and changers of expressions and event values.
  • Fix some syntax in wrong section due to internal reasons.
  • Update all syntax to include a proper name, description and examples

Summary

Events

On Anvil Combine

No description available yet.

No examples available yet.

Syntaxes

[on] anvil [item] (combine|merge)
Event values

event-player
event-inventory

Since
1.0 true

On Anvil Rename

No description available yet.

No examples available yet.

Syntaxes

[on] anvil [item] rename
Event values

event-string
event-player
event-itemstack
event-inventory

Since
1.0 true

On GUI click

No description available yet.

No examples available yet.

Syntaxes

[on] gui (action|click)
Event values

event-clicktype
event-integer
event-string
event-player
event-itemstack
event-inventory

Since
1.0 true

On Inventory drag

No description available yet.

No examples available yet.

Syntaxes

[on] inventory drag
Event values

event-string
event-player
event-itemstack
event-inventory

Since
1.0 true

On Inventory move

No description available yet.

No examples available yet.

Syntaxes

[on] inventory move
Event values

event-string
event-player
event-itemstack

Since
1.0 true

On Item craft

No description available yet.

No examples available yet.

Syntaxes

[on] [tuske] prepare item craft
Event values

event-player
event-recipe
event-itemstack
event-inventory

Since
1.0 false

On Item damage

No description available yet.

No examples available yet.

Syntaxes

[on] [player] item damage
Event values

event-world
event-player
event-itemstack

Since
1.0 true

On Spawner spawn

No description available yet.

No examples available yet.

Syntaxes

[on] [mob] spawner spawn
Event values

event-block
event-world
event-entity

Since
1.0 true
## Conditions

CondCanEat

No description available yet.

No examples available yet.

Syntaxes

%itemtypes% is edible
%itemtypes% is(n't| not) edible

Since
1.0

CondHasCustom

No description available yet.

No examples available yet.

Syntaxes

%itemstack% has [a] custom enchantment [%-customenchantment%]
%itemstack% has(n't| not) [a] custom enchantment [%-customenchantment%]

Since
1.0

CondHasGUI

No description available yet.

No examples available yet.

Syntaxes

%player% has [a] gui
slot %number% of %player% is a gui
%player% does(n't| not) have [a] gui
slot %number% of %player% is(n't| not) [a] gui

Since
1.0

CondHasGravity

No description available yet.

No examples available yet.

Syntaxes

%itemtypes% has gravity
%itemtypes% has(n't| not) gravity

Since
1.0

CondIsAgeable

No description available yet.

No examples available yet.

Syntaxes

%entities% ((is|are) ageable|can grow up)
%entities% ((is|are)(n't| not) ageable|can(n't| not) grow up)

Since
1.0

CondIsBlockType

No description available yet.

No examples available yet.

Syntaxes

%itemtypes% is [a] (solid|transparent|flammable|occluding) block
%itemtypes% is(n't| not) [a] (solid|transparent|flammable|occluding) block

Since
1.0

CondIsMobType

No description available yet.

No examples available yet.

Syntaxes

%livingentities% (is|are) [a] (hostile|neutral|passive) [mob]
%livingentities% (is|are)(n't| not) [a] (hostile|neutral|passive) [mob]

Since
1.0

CondIsTameable

No description available yet.

No examples available yet.

Syntaxes

%entities% (is|are) tameable
%entities% (is|are)(n't| not) tameable

Since
1.0

CondRegexMatch

No description available yet.

No examples available yet.

Syntaxes

%strings% [regex] matches %string%
%strings% [regex] does(n't| not) match %string%

Since
1.0
## Effects

Cancel Drops

Cancels the drops of items, experiences or both in death events, where it won't drop the player items (like gamerule KeepInventory), or cancel the item drop of break block event (for minecraft 1.12+ only).

on death of player:
	cancel the drops #It won't drop the experience and items.
 
on break of diamond ore:
	cancel the drops of items #It won't drop the items only.
Syntaxes

cancel [the] drops
cancel [the] drops of [e]xp[perience][s]
cancel [the] drops of (inventory|items)

Since
1.0, 1.8.1 (block break event)

Close GUI

It should be used in {{effects|CreateEditGUI|creating or editting a gui}}, it is just an extra option to run a code before it closes. This is optinal.

create new gui with id "Backpack.%player%" with virtual chest:
	run when close:
		saveInventoryItems(player, gui-inventory)
open last gui to player
Syntaxes

run (when|while) clos(e|ing) [[the] gui]

Since
1.7.5

Create a GUI

It creates a new gui with a given id (optional), using a base inventory, and a shape (optional) For more info, read the here

on skript load:
	create a gui with id "LobbySelector" with virtual chest with 4 rows named "&4Lobby Selector":
		make gui slot 2 with diamond sword named "PVP":
			execute player command "/server pvp" #'on skript load' event doesn't have a 'player', but it will recognize it as it does have.
		make gui slot 4 with grass named "SkyBlock":
			execute player command "/server skyblock"
 
command /lobby:
	trigger:
		open gui "LobbySelector" to player
Syntaxes

create [a] [new] gui [[with id] %-string%] with %inventory% [and shape %-strings%]
(change|edit) %guiinventory%

Since
1.7.5

EffEjectRecord

No description available yet.

No examples available yet.

Syntaxes

eject record (of|from|) %block%

Since
1.0

EffEvaluateFunction

No description available yet.

No examples available yet.

Syntaxes

evaluate function %strings% [with <.+?>]
evaluate function %strings%(<.+?>)

Since
1.0

EffExecutePermission

No description available yet.

No examples available yet.

Syntaxes

[execute] [the] command %strings% by %players% with perm[ission] %string%
[execute] [the] %players% command %strings% with perm[ission] %string%
(let|make) %players% execute [[the] command] %strings% with perm[ission] %string%

Since
1.0

EffFormatGUI

No description available yet.

No examples available yet.

Syntaxes

(format|create|make) [a] gui slot [%-numbers%] of %players% with %itemstack% [to [do] nothing]
(format|create|make) [a] gui slot [%-numbers%] of %players% with %itemstack% to (close|open %-inventory%) [(using|with) %-string/clicktype% [(button|click|action)]]
(format|create|make) [a] gui slot [%-numbers%] of %players% with %itemstack% to (run|exe[cute]) [(using|with) %-string/clicktype% [(button|click|action)]]
(format|create|make) [a] gui slot [%-numbers%] of %players% with %itemstack% to [(close|open %-inventory%) then] (run|exe[cute]) %commandsender% command %string% [(using|with) perm[ission] %-string%][[(,| and)] (using|with) %-string/clicktype% [(button|click|action)]][[(,| and)] (using|with) cursor [item] %-itemstack%]
(format|create|make) [a] gui slot [%-numbers%] of %players% with %itemstack% to [(close|open %-inventory%) then] (run|exe[cute]) function <(.+)>([<.*?>])[[(,| and)] (using|with) %-string/clicktype% [(button|click|action)]][[(,| and)] (using|with) cursor [item] %-itemstack%]
(format|create|make) [a] gui slot [%-numbers%] of %players% with %itemstack% to (run|exe[cute]) [gui [click]] event

Since
1.0

EffGuiProperties

No description available yet.

No examples available yet.

Syntaxes

change gui inventory to name %string% and size %number%
change gui shape [of (items|actions)] to %strings%
change gui properties of inventory to name %string% [with %-number% row[s]] and shape [of (items|actions)] to %strings%

Since
1.0

EffMakeDrop

No description available yet.

No examples available yet.

Syntaxes

(make|force) %player% drop[s] %itemstack% [from (%-slot%|his inventory)]

Since
1.0

EffPushBlock

No description available yet.

No examples available yet.

Syntaxes

move %block% to %direction%

Since
1.0

EffRegisterEnchantment

No description available yet.

No examples available yet.

Syntaxes

(register|create) [a] [new] [custom] enchantment with id [name] %string%

Since
1.0

EffRegisterPermission

No description available yet.

No examples available yet.

Syntaxes

(register|create) master permission %string%

Since
1.0

EffRegisterRecipe

No description available yet.

No examples available yet.

Syntaxes

(create|register) [new] [custom] shaped recipe with (return|result) %itemstack% using [ingredients] %itemstacks% [with shape %-strings%]
(create|register) [new] [custom] shapeless recipe with (return|result) %itemstack% using [ingredients] %itemstacks%
(create|register) [new] [custom] furnace recipe with (return|result) %itemstack% using [source] %itemstack% [[and] with experience %-number%]

Since
1.0

EffSaveData

No description available yet.

No examples available yet.

Syntaxes

save [player] data of %player%

Since
1.0

EffUnformatGUI

No description available yet.

No examples available yet.

Syntaxes

(unformat|remove|clear|reset) [the] gui slot %numbers% of %players%
(unformat|remove|clear|reset) [all] [the] gui slots of %players%

Since
1.0

EffUnregisterEnchantment

No description available yet.

No examples available yet.

Syntaxes

unregister [the] [custom] enchantment %customenchantment%

Since
1.0

Evaluate

This effect will run any Skript effect/condition from a given string or piece of code. The difference between {{effects|EvaluateInputEffect|SkQuery effect}} and this is basically it returns all syntaxes errors instead of send them to the console, It can evaluate a long amount of code and see them easily instead of beeing in one line. For example, you can run a effect from a string, from a piece of code (without beeing quoted) or the entiry section of code. Starting from 1.8, you can disallow some syntaxes when evaluating. Read more about it at config file (TuSKe/config.yml).

set {_effect} to "send"
evaluate:
	%{_effect}% "This message will be sent to a player."
#Before parsing the code, it will convert all variables
#To string, basically it will interpret the code above as it
#was a whole string: "%{_effect}% ""This message will be sent to a player."""
#where Skript will replace '%{_effect}%' with the variable value and then it will parse
#The code. It is the same concept of Skript Options.
 
evaluate: kill all players #Not really needed for this but just an example
evaluate: "broadcast ""Hi everyone"""
evaluate:
	if true is true:
		give a diamond sword of %{Enchantment}% 1 to all players
evaluate logging in {_errors::*}: this is not a valid effect
if {_errors::*} is set:
	loop {_errors::*}: #If there is something wrong, it will add the errors here
		send loop-value
#It will send a string in Skript default error format:
<Error message>: <wrong expression> (TuSKe/evaluate.sk, line <line of code>, '<whole line>')
'TuSKe/evaluate.sk' is a fictitious file, it doesn't exist.
Syntaxes

eval[uate][ logging [[the] error[s]] in %-objects%][ with safety]: (%-strings%|<.+?>)

Since
1.7.5, 1.8 (filtering syntaxes)

Make GUI

Used to format a gui slot inside of gui creation/editing section

No examples available yet.

Syntaxes

(make|format) next gui [slot] (with|to) %itemstack%
(make|format) gui [slot] %strings/numbers% (with|to) %itemstack%
(un(make|format)|remove) next gui [slot]
(un(make|format)|remove) gui [slot] %strings/numbers%
(un(make|format)|remove) all gui [slot]

Since
1.0
## Expressions

All Recipes

Returns all server recipes. You can get the {{expressions|RecipeIngredients|ingredients}} and the {{expressions|RecipeResult|result item}}.

command /recipes <integer=1>:
	usage: /recipes <page>
	trigger:
		set {_list::*} to page arg of all recipes with 10 lines
		loop {_list::*}:
			send "Ingredients to create %result item of loop-value%: %ingredients of loop-value%"
Syntaxes

[all] [registred] (shaped|shapeless|furnace|) recipes

Since
1.6.8, 1.7.5 (recipe type list)
Return type
Recipe remove, delete and reset

All commands

Returns a list containing all registered commands or scripts commands only.

send "Current amount of script commands: %size of all script commands%
send "Current amount of non script commands: %size of commansd - size of script commands%
send "Total: %size of all commands%"
Syntaxes

[all] [registered] [script] commands

Since
1.6.9.7
Return type
Text none

Alphabetical Order

Will return a list of {{types|Objects|objects}} organized in alphabetic order.

loop alphabetical order of all players:
	send "%loop-object%"
Syntaxes

alphabetical order of %objects%

Since
1.0
Return type
Object none

Command Info

Get informations about a command.

if co
Syntaxes

[the] description of command %string%
command %string%'[s] description
[the] main [command] of command %string%
command %string%'[s] main [command]
[the] permission of command %string%
command %string%'[s] permission
[the] permission message of command %string%
command %string%'[s] permission message
[the] plugin [owner] of command %string%
command %string%'[s] plugin [owner]
[the] usage of command %string%
command %string%'[s] usage
[the] aliases of command %string%
command %string%'[s] aliases
[the] file [location] of command %string%
command %string%'[s] file location

Since
1.6.9.6, 1.6.9.7
Return type
Text none

ExprAcceptedItems

No description available yet.

No examples available yet.

Syntaxes

accepted items for %customenchantment%

Since
1.0
Return type
Text set

ExprAllCustomEnchants

No description available yet.

No examples available yet.

Syntaxes

[the] [all] custom enchantments of %itemstack%
%itemstack%'[s] [all] custom enchantments

Since
1.0
Return type
Custom Enchantment add, set, remove, remove all, delete and reset

ExprCEConflicts

No description available yet.

No examples available yet.

Syntaxes

conflicts for %customenchantment%

Since
1.0
Return type
Custom Enchantment add, set, remove, delete and reset

ExprCatType

No description available yet.

No examples available yet.

Syntaxes

[the] (cat|ocelot) type of %entity%
%entity%'[s] (cat|ocelot) type

Since
1.0
Return type
Text set

ExprDraggedItem

No description available yet.

No examples available yet.

Syntaxes

[event-][old(-| )]dragged(-| )item

Since
1.0
Return type
Item / Material add, set, remove, delete and reset

ExprDraggedSlots

No description available yet.

No examples available yet.

Syntaxes

[event-]dragged(-| )(top|bottom)(-| )slots

Since
1.0
Return type
integer none

ExprDroppedExp

No description available yet.

No examples available yet.

Syntaxes

[the] dropped [e]xp[erience] [orb[s]]

Since
1.0
Return type
Experience add, set, remove, delete and reset

ExprDropsOfBlock

No description available yet.

No examples available yet.

Syntaxes

drops of %block% [(with|using) %-itemstack%]
%block%'[s] drops [(with|using) %-itemstack%]

Since
1.0
Return type
Item / Material none

ExprEnabled

No description available yet.

No examples available yet.

Syntaxes

enabled for %customenchantment%

Since
1.0
Return type
Boolean set

ExprEvaluateFunction

No description available yet.

No examples available yet.

Syntaxes

result of function %string% [with <.+?>]
result of function %string(<.+?>)

Since
1.0
Return type
Object none

ExprExpOf

No description available yet.

No examples available yet.

Syntaxes

[the] [total] [e]xp of %player%
%player%'[s] [total] [e]xp

Since
1.0
Return type
integer add, set, remove, delete and reset

ExprFirstLogin

No description available yet.

No examples available yet.

Syntaxes

[the] first login of %offlineplayer%
%offlineplayer%'[s] first login

Since
1.0
Return type
Date none

ExprFurnaceRecipeLevel

No description available yet.

No examples available yet.

Syntaxes

[the] furnace level of %recipe%
%recipe%'[s] furnace level

Since
1.0
Return type
Number none

ExprGUIValue

No description available yet.

No examples available yet.

Syntaxes

gui-slot
gui-raw-slot
gui-hotbar-slot
gui-inventory
gui-inventory-action
gui-click-(type|action)
gui-cursor[-item]
gui-[(clicked|current)-]item
gui-slot-type
gui-player
gui-players
gui-inventory-name
gui-slot-id
gui

Since
1.0
Return type
Object none

ExprHighiestBlock

No description available yet.

No examples available yet.

Syntaxes

highest block at %location%

Since
1.0
Return type
Block add, set, remove, remove all and delete

ExprHorseColor

No description available yet.

No examples available yet.

Syntaxes

[the] horse color of %entity%
%entity%'[s] horse color

Since
1.0
Return type
Text set

ExprHorseStyle

No description available yet.

No examples available yet.

Syntaxes

[the] horse style of %entity%
%entity%'[s] horse style

Since
1.0
Return type
Text set

ExprHorseVariant

No description available yet.

No examples available yet.

Syntaxes

[the] horse variant of %entity%
%entity%'[s] horse variant

Since
1.0
Return type
Text set

ExprInventoryMoveInv

No description available yet.

No examples available yet.

Syntaxes

[event-]inventory-(one|two)

Since
1.0
Return type
Inventory add, set, remove, remove all and delete

ExprInventoryMoveSlot

No description available yet.

No examples available yet.

Syntaxes

[event-]slot-(one|two)

Since
1.0
Return type
integer none

ExprItemCustomEnchant

No description available yet.

No examples available yet.

Syntaxes

%itemstack% with custom enchantment[s] %customenchantments%

Since
1.0
Return type
Item / Material none

ExprItemDamage

No description available yet.

No examples available yet.

Syntaxes

item damage

Since
1.0
Return type
integer delete

ExprItemsOfRecipe

No description available yet.

No examples available yet.

Syntaxes

[the] [all] ingredients of %recipe%
%recipe%'[s] [all] ingredients

Since
1.0
Return type
Item / Material none

ExprJukeboxRecord

No description available yet.

No examples available yet.

Syntaxes

[the] [jukebox] record of %block%
%block%'[s] [jukebox] record

Since
1.0
Return type
Item / Material set

ExprLanguage

No description available yet.

No examples available yet.

Syntaxes

[the] (locale|language) of %player%
%player%'[s] (locale|language)

Since
1.0
Return type
Text none

ExprLastAttacker

No description available yet.

No examples available yet.

Syntaxes

[the] last attacker of %entity%
%entity%'[s] last attacker

Since
1.0
Return type
Object none

ExprLastColor

No description available yet.

No examples available yet.

Syntaxes

[the] last color of %string%
%string%'[s] last color

Since
1.0
Return type
Text none

ExprLastDamage

No description available yet.

No examples available yet.

Syntaxes

[the] last damage of %livingentity%
%livingentity%'[s] last damage

Since
1.0
Return type
Number none

ExprLastDamageCause

No description available yet.

No examples available yet.

Syntaxes

[the] last damage cause of %livingentity%
%livingentity%'[s] last damage cause

Since
1.0
Return type
Damage Cause none

ExprLastLogin

No description available yet.

No examples available yet.

Syntaxes

[the] last login of %offlineplayer%
%offlineplayer%'[s] last login

Since
1.0
Return type
Date none

ExprLeatherColor

No description available yet.

No examples available yet.

Syntaxes

[the] [leather] (red|green|blue) colo[u]r of %-itemstacks/colors%
%-itemstacks/colors%'[s] [leather] (red|green|blue) colo[u]r

Since
1.0
Return type
integer add, set and remove

ExprLevelOfCustomEnchant

No description available yet.

No examples available yet.

Syntaxes

level of [custom enchantment] %customenchantment% of %itemstack%

Since
1.0
Return type
Number none

ExprListPaged

No description available yet.

No examples available yet.

Syntaxes

page %number% of %objects% with %number% lines

Since
1.0
Return type
Object none

ExprLocalNameOf

No description available yet.

No examples available yet.

Syntaxes

[the] [json] client id of %object%
%object%'[s] [json] client id

Since
1.0
Return type
Text none

ExprLoreName

No description available yet.

No examples available yet.

Syntaxes

[the] lore name of %customenchantment%
%customenchantment%'[s] lore name

Since
1.0
Return type
Text set

ExprMaxLevel

No description available yet.

No examples available yet.

Syntaxes

[the] max level of %customenchantment%
%customenchantment%'[s] max level

Since
1.0
Return type
Number add, set, remove, delete and reset

ExprRarity

No description available yet.

No examples available yet.

Syntaxes

[the] rarity of %customenchantment%
%customenchantment%'[s] rarity

Since
1.0
Return type
Number add, set, remove, delete and reset

ExprRecipeFromItems

No description available yet.

No examples available yet.

Syntaxes

recipe from ingredients %itemstacks%

Since
1.0
Return type
Recipe none

ExprRecipesOf

No description available yet.

No examples available yet.

Syntaxes

[the] [all] recipes of %itemstack%
%itemstack%'[s] [all] recipes

Since
1.0
Return type
Recipe none

ExprRegexRandom

No description available yet.

No examples available yet.

Syntaxes

(first|random) string matching [pattern] %regex/string%
random strings matching [pattern] %regex/string%

Since
1.0
Return type
Text none

ExprRegexReplace

No description available yet.

No examples available yet.

Syntaxes

regex replace (all|every|first|) [pattern] %regex/string% with [group[s]] %string% in %string%

Since
1.0
Return type
Text none

ExprRegexSplit

No description available yet.

No examples available yet.

Syntaxes

regex split %string% (with|using) [pattern] %regex/string%

Since
1.0
Return type
Text none

ExprResultOfRecipe

No description available yet.

No examples available yet.

Syntaxes

[the] result item of %itemstacks/recipe%
%itemstacks/recipe%'[s] result item

Since
1.0
Return type
Item / Material none

ExprShapeOfRecipe

No description available yet.

No examples available yet.

Syntaxes

[the] shape of %recipe%
%recipe%'[s] shape

Since
1.0
Return type
Text none

ExprVirtualInv

No description available yet.

No examples available yet.

Syntaxes

virtual %inventorytype% [inventory] [with size %-number%] [(named|with (name|title)) %-string%]
virtual %inventorytype% [inventory] [with %-number% row[s]] [(named|with (name|title)) %-string%]
virtual %inventorytype% [inventory] [(named|with (name|title)) %-string%] with size %-number%
virtual %inventorytype% [inventory] [(named|with (name|title)) %-string%] with %-number% row[s]

Since
1.0
Return type
Inventory add, set, remove, remove all and delete

Last GUI/GUI from id

It is used to return the last created gui or a gui from a string id.

on skript load:
	create new gui with id "HUB" with virtual chest:
		make gui slot 1 with diamond named "Server 1":
			execute player command "/server server1"
		make gui slot 2 with paper named "Server 2":
			execute player command "/server server2"
 
command /hub [<text>]:
	trigger:
		open gui "HUB" to player
Syntaxes

last[ly] [created] gui
gui [with id] %string%

Since
1.7.5
Return type
GUI delete

Max Durability

Returns the max durability of {{types|ItemStack|item stack}}. i.e. 1561 for diamond sword. You can cancel it.

on item damage:
	if durability of event-item is more than (max durability of event-item - item damage):
		send "Your %event-item% is almost breaking!"
Syntaxes

[the] max durability of %itemstack%
%itemstack%'[s] max durability

Since
1.1
Return type
integer none

Minecraft Version

Returns the minecraft version of {{types|Player|player}}.

on join:
if minecraft version of player is "1.9":
send "You're joining with version %mc version of player%!"
Syntaxes

[the] (mc|minecraft) version of %player%
%player%'[s] (mc|minecraft) version

Since
1.0 (ProtocolSupport), 1.0.5 (ViaVersion)
Return type
Text none
Dependency
ProtocolSupport or ViaVersion

Offline Player from UUID

It get a player from a UUID. If you have Bensku's fork dev23+, you can just use {{expressions|Parse|parse expression}} using the uuid. Also, the uuid needs to be from a player that already played on your server, else it will return null value.

set {_player} to offline player from "4580682b-ad69-41e5-a979-6b1b3b2cf9c1"
Syntaxes

offline player from [uuid] %string%

Since
1.7.1
Return type
Offlineplayer none

Online Time

Returns a {{types|Timespan|timespan}} of online time of {{types|Player|player}} or of the server. Only the online time of player can be edited.

command /online:
	trigger:
		send "You're online for %online time of player% and the server is online for %online time of server%"
Syntaxes

[the] online time of %player%
%player%'[s] online time

Since
1.0 (player), 1.5.8 (server)
Return type
Timespan add, set, remove, delete and reset

Player Data

Returns a {{types|OfflinePlayer|offline player}} as it was a player, which means that you can get some values like money, inventory, enderchest,etc. Maybe all values doesn't work. If you want to change these values, you will have to {{effects|SavePlayerData|save player data}}.

command /money <offlineplayer>:
	trigger:
		if arg is not online:
send "%money of player data of arg%"
Syntaxes

[the] player data of %offlineplayer%
%offlineplayer%'[s] player data

Since
1.1
Return type
Player add, remove and remove all

RGB Color

Returns the rgb color of {{types|ItemStack|item stack}} or {{types|Color|color}}. You can set these values only for item stacks, in this case, leather armors. The RGB color returns a list with 3 numbers and the other expressions returns which one separated.

set {_PlayerEquipaments::*} to player's helmet, player's chestplate, player's leggings and player's boots #Must be leather armor
 
set rgb color of {_PlayerEquipaments::*} to rgb of color red
add 1 to red color of {_PlayerEquipaments::*}
remove 1 from green color of {_PlayerEquipaments::*}
set blue color of {_PlayerEquipaments::*} to 30
Syntaxes

[the] R[ed, ]G[reen and ]B[blue] [colo[u]r[s]] of %-itemstacks/colors%
%-itemstacks/colors%'[s] R[ed, ]G[reen and ]B[blue] [colo[u]r[s]]

Since
1.5.3 (single value of items), 1.6 (list values of items and color)
Return type
integer set

Rabbit Type

Returns the type of rabbit. e.g. black, black and white, brown, gold, salt and pepper, the killer bunny and white.

on spawn of rabbit:
	if rabbit type of event-entity is "the killer bunny":
		broadcast "Run, everyone, run! The Killer Bunny was spawned!"
Syntaxes

[the] rabbit type of %entity%
%entity%'[s] rabbit type

Since
1.0
Return type
Text set

Recipe ID

Starting from minecraft 1.12, the recipes now has a unique id. Recipes registered by minecraft will have a id minecraft:%the result item's name%, an old recipe plugin will be bukkit:%random uuid%, while TuSKe will have its id as tuske:%last recipe id + 1%. Other plugins may have a different format, but always following <plugin>:<key>.Only for Shaped and Shapeless recipes

loop recipes of held item:
	add "{recipeBook:{recipes:["%recipe id of loop-recipe%"]}}" to player's nbt
Syntaxes

[the] recipe (id|name|key) of %recipes%
%recipes%'[s] recipe (id|name|key)

Since
1.8
Return type
Text none

Recipe Owner

Starting from minecraft 1.12, recipes have now the register plugin. If it is a minecraft recipe, it will return as Minecraft, if it is an old recipe plugin, it will return as Bukkit and everything else will return the plugin's name. Only for Shaped and Shapeless recipes

loop recipes of held item:
	if recipe owner of loop-recipe is "Minecraft":
		send "That's a vanilla recipe!"
Syntaxes

[the] recipe owner of %recipes%
%recipes%'[s] recipe owner

Since
1.8
Return type
Text none

Regex Error

It contains the last error of a regex. It is setted when there is a error while parsing a string as regex, {{effects|RegexReplace|replacing}}/{{effects|RegexSplit|spliting}} a string or checking in the {{conditions|RegexMatches|condition}}

set {_regex} to "(\d+(\.\d+)*" parsed as regex
if regex error is set: #It will case there is a missing parentheses at the end.
	send "A error occurred with the regex pattern. Details:"
	send last regex parser error
	#It will send a formatted strings like showing the errors. For example:
	#Unclosed group near index 12
	#(\d+(\.\d+)*
	#             ^
Syntaxes

[last] regex [parser] error

Since
1.7.1
Return type
Text none

Regex Pattern

This expression returns some regex patterns that Skript or Bukkit uses most.

player's uuid regex matches uuid pattern #It will be always true.
"{MyVariable}" regex matches variable pattern
set {_list::*} to regex split "%{VariableList::*}%" with list pattern
Syntaxes

<.+> [regex] pattern

Since
1.7.5
Return type
Regex none

Split Characters

Split a text with {{types|Number|number}} amount of characters. It is used to split the message in chat (the default is 60) and to item's lore.

set {_s::*} to split "Hi, this text will be splitted in 3 lines" by 10 characters
Syntaxes

split %string% (with|by|using) %number% [char[acter][s]]
%string% [split] (with|by|using) %number% [char[acter][s]]

Since
1.6.8
Return type
Text none
## Types

Click Type/Action

Represents a click type of a inventory click event.

on right click with compass:
	wait a tick
	create new gui with virtual chest: #TuSKe
		make gui slot 0 with stonebrick:
			if gui-click-type is left or right:
				give gui-clicked-item to player
	open last created gui to player
 
on inventory click:
	if click action is left mouse button or right mouse button: #Bensku's fork
		give event-slot to player
		cancel event
Pattern click[ ](action[s]|type[s])
Usage left mouse button, left mouse button with shift, right mouse button, right mouse button with shift, window border using right mouse button, window border using left mouse button, middle mouse button, number key, double click using mouse, drop key, drop key with control, creative action, unknown

Since
1.6.2

Custom Enchantment

It represents a custom enchantment. The values depends of the id name of {{effects|RegisterEnchantment|registered enchantment}}.

if "Soulbound" parsed as custom enchantment is set: #checks if the custom enchantment exists.
Pattern custom[ ]enchantment[s]

Since
1.5.1

GUI

It represents a gui inventory, where the player can take items away from the inventory. It can be created only with {{effects|MakeGUI|advanced gui effect}}.

/command gui:
	trigger:
		create new gui with virtual chest named "Hub" with 3 rows: #Create a new gui based in a inventory
			make gui slot 13 with cake named "&e&lLobby": #Format slot with a given item
				make player execute command "server Lobby" #Code to be executed when the player clicks on gui
		open last gui to player #Open the last created gui to the player
Pattern gui[ ]inventor(y|ies)

Since
1.7.5

Inventory Action

It represents a inventory action of a inventory click event.

command /gui:
	trigger:
		create new gui with virtual chest: #TuSKe
			make gui slot 0 with stonebrick:
				if gui-inventory-action is move to other inventory:
					send "You can take that item!"
		open last created gui to player
 
on inventory click:
	if inventory action is move to other inventory:
		send "You can't take that item!"
		cancel event
Pattern inventory[ ]action[s]
Usage nothing, pickup all, pickup some, pickup half, pickup one item, place all, place some, place one, swap with cursor, drop all from cursor, drop one from cursor, drop all from slot, drop one from slot, instant move, hotbar move and readd, swap with hotbar, clone stack, collect to cursor, unknown

Since
1.7.5

Inventory Type

Represents the type of an inventory. {{effects|MakeGUI|TuSKe}} and {{expressions|BlankInventory|SkQuery}} uses in their expressions.

#SkQuery
open inventory of hopper to player
#TuSKe
open virtual hopper named "Tittle" to player
Pattern inventory[ ]type[s]
Usage chest, dispenser, dropper, furnace, workbench, crafting, enchanting, brewing, player, creative, merchant, ender chest, anvil, beacon, hopper

Since
1.6.9.7

Recipe

A recipe contains the the ingredients list and the result item. Can only be get by {{expressions|Recipes|recipes's expression}}.

loop recipes of {_item}:
	if "%loop-recipe%" is "furnace recipe":
		send "You have to make this recipe in a furnace."
Pattern recipe[s]

Since
1.0.7

Regex

Represents a regex object. For now, it won't have any usage but only for test the pattern. It will have more usage in future versions.

set {_regex} to "(\d+(\.\d+)*" parsed as regex
if regex error is set: #It will case there is a missing parentheses at the end.
	send "A error occurred with the regex pattern. Details:"
	send last regex parser error
	#It will send a formatted strings like showing the errors. For example:
	#Unclosed group near index 12
	#(\d+(\.\d+)*
	#             ^
Pattern reg[ular ]ex[pression[s]|es]

Since
1.7.1

Slot Type

It represents a type of a inventory slot

command /gui:
	trigger:
		create new gui with virtual workbench: #TuSKe
			make gui slot 0 with diamond sword:
				if gui-slot-type is result slot:
					set gui-clicked-item to air
		open last created gui to player
Pattern slot[ ]type[s]
Usage result slot, crafting slot, armor slot, container slot, quickbar slot, outside slot, fuel slot

Since
1.7.5
Clone this wiki locally