Uuid (Expression) — Skript

Addon: Skript · Category: Expression · Since: 2.1.2, 2.2 (offline players' uuids), 2.2-dev24 (other entities' uuids)

Syntax

[the] UUID of %offlineplayers/worlds/entities%

Description

The UUID of a player, entity or world.

Examples

# prevents people from joining the server if they use the name of a player
# who has played on this server at least once since this script has been added
on login:
	if {uuid::%name of player%} exists:
		{uuid::%name of player%} is not uuid of player
		kick player due to "Someone with your name has played on this server before"
	else:
		set {uuid::%name of player%} to uuid of player
command /what-is-my-uuid:
	trigger:
		set {_uuid} to uuid of player
		send "Your UUID is '%string within {_uuid}%'"

View source