Time Played (Expression) — Skript

Addon: Skript · Category: Expression · Since: 2.5, 2.7 (offline players)

Syntax

[the] (time played|play[ ]time) of %offlineplayers%

Description

The amount of time a player has played for on the server. This info is stored in the player's statistics in the main world's data folder. Changing this will also change the player's stats which can be views in the client's statistics menu. Using this expression on offline players on Minecraft 1.14 and below will return nothing <code>&lt;none&gt;</code>.

Examples

set {_t} to time played of player
if player's time played is greater than 10 minutes:
	give player a diamond sword
set player's time played to 0 seconds

View source