Effects

SkQuery Version: 3.6.3
Last updated: March 25th, 2019

Clear Server Recipes

Clears all recipes registered in the server. Use this effect to clear individual recipes.

wipe server crafting recipes
Example
on script load:
	wipe server crafting recipes

Restore Inventory

Restores a player's inventory to a backup. This effect is deprecated and you should use Inventory Serials instead.

restore %inventories% (to|from) %string%

Stop MIDI

Stops a midi file that is playing.

stop midi [id] %string%
Example
on join:
	play midi "login" to player
	wait 5 seconds
	stop midi "login"

Pathfind

Invoke the entity pathfinder. Allows entities to pathfind to a location unless they are distracted. Not all entities have pathfinders.

make %livingentities% pathfind to %location% (with|at) speed %number%
Example
on click on cow:
	while clicked entity exists:
		make clicked entity pathfind to player with speed
		wait 1 tick

SQL Username Option

Sets the script-wide database connection username. Required for an SQL connection.

$ db username <.+>
Example
script options:
	$ init com.mysql.jdbc.Driver
	$ db url jdbc:mysql://localhost:3306/skript
	$ db username admin
	$ db password heil_putin

Clear Single Recipes

Clears all recipes for a single item.

wipe crafting recipes for %itemtypes%
Example
on script load:
	wipe crafting recipes for stick and iron pickaxe

EffOptionSQLPool

$ pool <.+>

EffShootItemProjectile

make %livingentity% shoot [an] item projectile [of] %itemtype% [at speed %number%]

EffShowCredits

display credits to %player%

Make Say

Force players to say text in chat. If you add a leading slash in the text, it will execute a command.

(make|force) %players% [to] say %strings%
Example
on chat:
	cancel event
	make a random player out of all players say message

SQL URL Option

Sets the script-wide database connection url. Required for an SQL connection.

$ db url <.+>
Example
script options:
	$ init com.mysql.jdbc.Driver
	$ db url jdbc:mysql://localhost:3306/skript
	$ db username admin
	$ db password heil_putin

Spawn Falling Block

Summons falling blocks with modifiable properties.

spawn falling block of %itemtype% at %locations%

spawn damaging falling block of %itemtype% at %locations%

spawn undroppable falling block of %itemtype% at %locations%

spawn damaging undroppable falling block of %itemtype% at %locations%

spawn undroppable damaging falling block of %itemtype% at %locations%
Example
on place of dirt:
	cancel event
	spawn falling block of dirt at block

Register Recipe

Register a crafting recipe. Use air as an itemtype to indicate the slot is not used. All 9 itemtypes must be present.

register new shaped recipe for %itemtype% using %itemtype%, %itemtype%, %itemtype%, %itemtype%, %itemtype%, %itemtype%, %itemtype%, %itemtype%, %itemtype%

register new shapeless recipe for %itemtype% using %itemtype%, %itemtype%, %itemtype%, %itemtype%, %itemtype%, %itemtype%, %itemtype%, %itemtype%, %itemtype%

Leash Entities

Cause multiple entities to leash other entities.

make %entities% (leash|lead) %livingentities%

(leash|lead) %livingentities% to %entities%
Example
on click:
	make player leash clicked entity

Safely Execute Thread

Makes the next line of code run on a different thread. The code following it will be delayed until the thread finishes.

$ thread

EffExecuteLambda

(do|execute) [%-number% time[s]] %lambda%

Evaluate Input Effect

Runs the input string relative to the calling trigger which invoked it.

evaluate %string/markup%

^%markup%
Example
command /effectcommand :
	trigger:
		evaluate argument

EffTexture

send [(resource|texture)] pack from %string% to %players%

Pop Firework

Instantly detonate a firework at a given location. Having multiple effects will cause them to stack.

(detonate|pop) %fireworkeffects% at %locations%
Example
on death:
	pop ball large firework colored red at victim

Play Raw Sound

Imitates the functionality of the /playsound command, without the ability to specify target players.

play [raw] sound %string/sound% at %locations% with pitch %number% [and] volume %number%
Example
on sneak toggle:
	play raw sound "mob.bat.death" at player with pitch 1 volume 10

skQueryPerms Option

Enables skQuery as a permissions manager. You will then be able to access expressions that represent player permissions and change them with Skript.

$ use permissions
Example
script options:
	$ use permissions

EffSQLUpdate

update %string%

Visibility

Show or hide players from each other

hide %players% (to|from) %players%

reveal %players% (to|from) %players%
Example
command /ghosts:
	trigger:
		hide all players from all players

EffTameTo

tame %entities% to %player%

Escape Lines

Skip the execution of a certain number of lines.

escape %number% [(level[s]|line[s])]
Example
on script load:
	escape 1
	stop
	message "Stop avoided!" to console

Preinit Driver Option

Allows you to initialize an SQL driver before accessing it. Not required for an SQL connection.

$ init <.+>
Example
script options:
	$ init com.mysql.jdbc.Driver
	$ db url jdbc:mysql://localhost:3306/skript
	$ db username admin
	$ db password heil_putin

EffStopServer

(stop|shutdown) server

Set Block Without Updates

Set blocks to another block without causing surrounding blocks to update.

@noupdate::set %blocks% to %itemtype%

Branch

Execute the following code X times. Useful for testing probabilities without requiring a loop and indentation.

branch %number%
Example
on script load:
	branch 10
	message "This message will pop up 10 times" to console

SQL Password Option

Sets the script-wide database connection password. Required for an SQL connection.

$ db password <.+>
Example
script options:
	$ init com.mysql.jdbc.Driver
	$ db url jdbc:mysql://localhost:3306/skript
	$ db username admin
	$ db password heil_putin

Entity Homing

Cause an entity to home towards a locations. Specifying 'normally' reduces bugs caused by varying distances, but makes it less accurate.

make %entity% home towards %location%

make %entities% home towards %location% normally
Example
make targeted entity home towards player normally

Make Damage

Cause entities to damage each other. If you cause hostile mobs to attack or be attacked, they will become aggroed on the last entity that they hit or got hit by.

(make|force) %livingentities% [to] damage %livingentities% by %number%
Example
command /massacre:
	trigger:
		make all pigs damage all cows by 1

Play MIDI

Plays a file with the extention .mid to a player.

play midi [from] %string% (for|to) %players% [at [tempo] %-number%] [with id %-string%]

play midi from (website|link) %string% (for|to) %players% [at [tempo] %-number%] [with id %-string%]
Example
on join:
	play midi "login" to player

Format Inventory Slot

Formats a slot in the player's open inventory to do certain actions. This should be done directly after showing an inventory to the player.

format slot %number% of %players% with %itemstack% to close then run %string/lambda%

format slot %number% of %players% with %itemstack% to run %string/lambda%

format slot %number% of %players% with %itemstack% to close

format slot %number% of %players% with %itemstack% to (be|act) unstealable

unformat slot %number% of %players%
Example
command /construct:
	trigger:
		open chest with 1 rows named "&4My first test menu" to player
		format slot 0 of player with 5 of steak named "Item 1" to close then run "say The first item was clicked! Menu Closed!"
		format slot 2 of player with fire named "Close Menu" with lore "I will close this menu.||Nothing more, nothing less." to close

Developer Mode Option

Enable the developer mode pragma to auto reload a script as it changes. This must be placed under the script-local options.

$ developer mode
Example
script options:
	$ developer mode

Launch Fireworks

Launch a firework with any number of firework effects at a given location and flight duration. Use this expression to create firework effects.

(launch|deploy) %fireworkeffects% at %locations% (with duration|timed) %number%
Example
on death:
	launch creeper firework colored red at victim timed 1

Client Sign

Cause a sign to have custom lines to certain viewers

make %players% see lines of %blocks% as %string%, %string%, %string%( and|,) %string%
Example
command /hidesign:
	trigger:
		make all players see lines of targeted block as "", "", "", ""

Client Block

Make a player see a block as another type of block. If the client recieves an update to the block, it will revert.

make %players% see %blocks% as %itemtype%
Example
on click:
	make player see clicked block as air