Region Members/Owners (Expression) — skript-worldguard

Addon: skript-worldguard · Category: Expression · Since: 1.0

Syntax

[the] [player|group] (members|owners) of %worldguardregions%

Description

An expression to obtain the members/owners of the given regions. The members/owners of a region are made up of players and groups (strings). By default, this expression returns both. However, keyword specifiers for each type (player/group) are available.

Examples

on region enter:
	message "You have entered %region%. It is owned by %owners of region%."
command /promote <text> <player>:
	trigger:
		set {_region} to the region text-argument in the player's world
		if player-argument is an owner of {_region}:
			message "<red>%player-argument% is already an owner of %{_region}%"
		else if player-argument is a member of {_region}:
			add player to the owners of {_region}
			message "<green>%player-argument% has been promoted to an owner of %{_region}%"
		else:
			add player to the members of {_region}
			message "<green>%player-argument% has been promoted to a member of %{_region}%"

View source