Conditionals (Section) — Skript

Addon: Skript · Category: Section · Since: 1.0

Syntax

else

Description

Conditional sections if: executed when its condition is true else if: executed if all previous chained conditionals weren't executed, and its condition is true else: executed if all previous chained conditionals weren't executed

parse if: a special case of 'if' condition that its code will not be parsed if the condition is not true else parse if: another special case of 'else if' condition that its code will not be parsed if all previous chained conditionals weren't executed, and its condition is true

Examples

if player's health is greater than or equal to 4:
	send "Your health is okay so far but be careful!"
else if player's health is greater than 2:
	send "You need to heal ASAP, your health is very low!"
else: # Less than 2 hearts
	send "You are about to DIE if you don't heal NOW. You have only %player's health% heart(s)!"
parse if plugin "SomePluginName" is enabled: # parse if %condition%
	# This code will only be executed if the condition used is met otherwise Skript will not parse this section therefore will not give any errors/info about this section

View source