Zum Hauptinhalt springen

Realms Skript Syntax

This page documents the built-in Skript integration that ships with Realms-API.

Java API

The underlying Java API is available in the Realms-API repository.

Overview

Expressions

Effects

Conditions

Events

Expressions

Boosts

Realm Boost Data

  • Type: Expressions
  • Group: Boosts
  • Returns: boost | integer | uuid | profile | date | long

Resolves fields of a realm boost object and exposes boost event data while a realm boost event is running.

The timestamp can optionally be returned as a Skript date.

Accepted Inputs

  • owner of, expiration of and amount of expect a boost object.
  • event-* patterns are available inside on realm boost.

Notes

  • realm boost amount without an input is shorthand for the current boost event amount.
  • The timestamp and expiration can be returned as raw epoch milliseconds or as a Skript date.

Patterns

  • [the] realm boost amount
  • (owner of|[the] owner of [realm] boost[er]) %object%
  • (expir[ation|y] of|[the] expir[ation|y] of [realm] boost[er]) %object% [date:as date]
  • (amount of|[the] amount of [realm] boost[er]) %object%
  • event-boost
  • event-boost-amount
  • event-uuid
  • event-profile
  • event-timestamp [date:as date]

Examples

on realm boost:
broadcast "%event-uuid% sent a boost with %event-boost-amount%"
send amount of event-boost to player
send expiration of event-boost as date to player

Display

Realm Display Text

  • Type: Expressions
  • Group: Display
  • Returns: component | string

Reads and updates custom realm prefixes and suffixes for players.

The expression can return adventure components directly or serialize them as legacy strings.

Accepted Inputs

  • %player% for all patterns

Notes

  • If you omit tab or chat, the change is applied to both channels.
  • The prefix syntax manages a custom override and not the player's group prefix.
  • The stored values persist across restarts.

Limits And Caveats

  • Without as string, the expression returns a Kyori Adventure component.

Patterns

  • [the] realm [(1:tab|2:chat)][(-| )]suffix of %player% [string:as string]
  • %player%'s realm [(1:tab|2:chat)][(-| )]suffix [string:as string]
  • [the] [custom] realm [(1:tab|2:chat)][(-| )]prefix of %player% [string:as string]
  • %player%'s [custom] realm [(1:tab|2:chat)][(-| )]prefix [string:as string]

Examples

send realm chat suffix of player as string to player
set realm chat prefix of player to "&6[VIP] "
reset player's custom realm tab prefix

Events

Realm Event Data

  • Type: Expressions
  • Group: Events
  • Returns: boost | uuid | profile | date | long

Provides shorthand access to common fields of the realm boost event.

Use these expressions only inside on realm boost.

Notes

  • These expressions are boost-event shorthands only and should be used inside on realm boost.

Patterns

  • event-boost
  • event-uuid
  • event-profile
  • event-timestamp [date:as date]

Examples

on realm boost:
send "%event-uuid% boosted with %event-boost-amount%" to player
send event-timestamp as date to player

Realm Join Reason

  • Type: Expressions
  • Group: Events
  • Returns: string

Returns the stored join reason of a player or the join reason of the current realm player join event.

Inside on realm player join, the shorthand realm join reason and event-reason both resolve to the event value.

Accepted Inputs

  • Player, offline player, UUID or UUID string for direct lookups

Valid Values

  • DIRECT for direct subdomain joins
  • LOBBY for joins through the lobby realm menu
  • JOINME for join-me accepts
  • FRIEND_JUMP for friend-list jumps

Notes

  • realm join reason and event-reason resolve to the current event value inside on realm player join.

Patterns

  • realm join reason of %object%
  • [the] realm join reason (of|from) %object%
  • event-reason
  • [the] realm join reason

Examples

send realm join reason of player to player
on realm player join:
broadcast "%player% joined through %realm join reason%"

Permissions

Realm Permissions

  • Type: Expressions
  • Group: Permissions
  • Returns: group | group[] | uuid | string | integer | permission[]

Returns realm groups, booster groups, player group assignments and group metadata.

Group-based patterns accept either a realm group object or a UUID that resolves to a group.

Accepted Inputs

  • Realm group metadata patterns accept a group object or a group UUID.
  • Player-group patterns accept %offlineplayer%.
  • The booster-group lookup accepts a boost count as %integer%.

Notes

  • The group prefix is serialized as text for Skript output.
  • Primary network group lookups come back through the Realms action wrapper and may return no value if unavailable.

Patterns

  • all realm groups
  • [the] realm (1:default|2:owner) group
  • [the] realm booster group at %integer% boost[s]
  • [the] realm booster groups
  • [the] group members of group [with id] %object%
  • [the] first [realm] group (with name|named) %string%
  • [the] [primary] realm group of %offlineplayer%
  • [the] primary network group of %offlineplayer%
  • [the] realm groups of %offlineplayer%
  • [the] [group] id of [realm] group %object%
  • [the] [group] name of [realm] group %object%
  • [the] [group] prefix of [realm] group %object%
  • [the] [group] color of [realm] group %object%
  • [the] [group] priority of [realm] group %object%
  • [the] permissions of [realm] group %object%

Examples

send all realm groups to player
send realm group of player to player
send permissions of realm group {_group} to player
send group members of group {_group} to player

Player

Realm Language

  • Type: Expressions
  • Group: Player
  • Returns: language | string

Reads a player's current realm language or accesses the old and new language inside the realm language change event.

Use the optional as string suffix when plain text output is preferred over the enum value.

Accepted Inputs

  • Player, offline player, UUID or UUID string for direct lookups

Valid Values

  • Common values include DE, DE_AT, DE_CH, MXN, EN, RU, FR and fallback values such as OTHER.

Notes

  • event-language, past event-language, new realm language and old realm language only make sense inside on realm player language change.
  • Use as string if you want the enum name instead of the language object.

Patterns

  • [the] (realm|cytooxien|cxn) language (from|of) %object% [string:as string]
  • event-language
  • past event-language
  • [the] new realm language
  • [the] old realm language

Examples

send realm language of player as string to player
on realm player language change:
send "Language changed from %past event-language% to %event-language%" to player

Realm Player Information

  • Type: Expressions
  • Group: Player
  • Returns: string | uuid | object | integer | boost[]

Resolves names, UUIDs, texture properties and boost data through the Realms player information provider.

The object input accepts players, offline players, UUIDs and UUID strings depending on the pattern.

Accepted Inputs

  • Player name lookup: player, offline player, UUID or UUID string
  • UUID lookup: player, offline player, UUID, UUID string or player name string
  • Texture property and boost patterns: player, offline player, UUID or UUID string

Notes

  • These lookups go through the Realms player information provider instead of external Mojang requests.
  • The boost list returns Skript list values that can be inspected with owner of realm booster, expiration of realm booster and amount of realm booster.

Patterns

  • [the] (realm|cytooxien|cxn) [player][(-| )]name (of|from) %object%
  • [the] (realm|cytooxien|cxn) uuid (of|from) %object%
  • [the] (realm|cytooxien|cxn) texture property (from|of) %object%
  • [the] realm boost count of %object%
  • %object%'s realm boost count
  • [the] realm boost(s| list) of %object%
  • %object%'s realm boost(s| list)

Examples

send realm player name of player to player
send realm uuid of offlineplayer("Notch") to player
send realm boost count of player to player
set {_boosts::*} to realm boosts of player
loop {_boosts::*}:
send amount of realm booster loop-value to player

Realm

Realm Information

  • Type: Expressions
  • Group: Realm
  • Returns: component | string | boolean | integer | boost[]

Reads and updates core realm metadata like display name, description, privacy state and maximum player count.

This expression also exposes the current boost count, boost list and configured custom domain.

Notes

  • The display name can be returned as a component or serialized string.
  • The boost list can be looped and combined with the boost helper expressions.
  • The subdomain pattern reads the currently configured custom domain.

Limits And Caveats

  • Changing the display name, privacy state and maximum player count can fail due to rate limits or realm restrictions.
  • Realm names are typically limited to 32 characters and descriptions to 128 characters.
  • Color formatting in the display name depends on the realm's current boost capabilities.

Patterns

  • [the] realm display name [string:as string]
  • [the] realm description
  • [the] realm privacy state
  • [the] max[imum] realm (players|player count)
  • [the] realm max (players|player count)
  • [the] realm boost (level|count)
  • [the] realm boost list
  • [the] realm (custom domain|subdomain)

Examples

send realm display name as string to player
set realm description to "Welcome to the realm"
set realm privacy state to true
set max realm player count to 3
send realm boost list to player

Realm Limits

  • Type: Expressions
  • Group: Realm
  • Returns: integer | boolean

Exposes the configured technical and gameplay limits of the current realm.

This includes CPU, RAM, disk, loaded worlds, groups and plugin limits.

Valid Values

  • custom plugins limit returns a boolean flag.
  • The remaining limit expressions return integer values.

Notes

  • These values describe the current boost-tier limits of the realm.

Patterns

  • [the] realm['s] cpu limit
  • [the] realm['s] ram limit
  • [the] realm['s] disk space limit
  • [the] realm['s] loaded worlds limit
  • [the] realm['s] custom group count limit
  • [the] realm['s] unused shutdown minutes limit
  • [the] realm['s] stopped unload minutes limit
  • [the] realm['s] custom plugins limit
  • [the] realm['s] plugin count limit

Examples

send realm cpu limit to player
send realm plugin count limit to player
send realm loaded worlds limit to player

Worlds

Realm Worlds

  • Type: Expressions
  • Group: Worlds
  • Returns: defined world | defined world[] | boolean

Lists defined realm worlds and resolves them by display name, internal name or UUID.

The world rule pattern can also be changed with set to update a boolean world rule on a defined world.

Accepted Inputs

  • World lookups accept a display name, internal name, defined world object or UUID depending on the pattern.
  • The world rule pattern accepts a rule name as %string% and a defined world or world UUID as %object%.

Notes

  • World rules are resolved by their Realms world-rule name.
  • The set realm world rule ... form updates boolean world rules on the stored defined world entry.

Patterns

  • [all] [defined] realm worlds
  • realm world by display name %string%
  • realm world by [internal] name %string%
  • realm world by uuid %object%
  • realm world rule %string% of [world] %object%

Examples

send all defined realm worlds to player
set {_world} to realm world by display name "spawn"
send realm world rule "pvp" of {_world} to player
set realm world rule "keep_inventory" of {_world} to true

Effects

Permissions

Realm Group Membership

  • Type: Effects
  • Group: Permissions

Adds or removes an offline player from a realm group.

The group argument accepts a realm group object or a group UUID.

Accepted Inputs

  • %offlineplayer% plus a realm group object or group UUID

Limits And Caveats

  • Membership changes can fail because of backend restrictions or rate limits.

Patterns

  • (1:add|2:remove) %offlineplayer% (from|to) realm group %object%

Examples

add offlineplayer("Notch") to realm group {_group}
remove player from realm group {_group}

Worlds

Realm World Action

  • Type: Effects
  • Group: Worlds

Loads, unloads or deletes a defined realm world.

The world argument accepts a defined world object or a world UUID.

Accepted Inputs

  • A defined world object or world UUID

Limits And Caveats

  • Deleting a world is destructive and should only be done when you are sure the world is no longer needed.

Patterns

  • unload realm world [with uuid] %object%
  • load realm world [with uuid] %object%
  • delete realm world [with uuid] %object%

Examples

load realm world {_world}
unload realm world "550e8400-e29b-41d4-a716-446655440000"
delete realm world {_world}

Conditions

Realm

Realm State

  • Type: Conditions
  • Group: Realm

Checks whether the current realm is private or promoted.

This condition reads the current realm state directly from the Realms information provider.

Notes

  • The promoted flag is available even if your realm rarely uses the promotion system.

Patterns

  • [the] realm (1:is|2:isn't) private
  • [the] realm (1:is|2:isn't) promoted

Examples

if realm is private:
send "This realm is private" to player
if realm is promoted:
broadcast "This realm is promoted"

Events

Events

Realms Events

  • Type: Events
  • Group: Events

Contains the built-in Realms event hooks for boosts, pauses, joins and language changes.

Use the matching event expressions like realm boost amount, realm join reason or event-language inside these events.

Valid Values

  • realm boost
  • realm pre pause
  • realm post pause
  • realm player join
  • realm player language change

Notes

  • Use the boost helper expressions inside on realm boost.
  • Use realm join reason inside on realm player join.
  • Use event-language and past event-language inside on realm player language change.

Patterns

  • realm boost
  • realm boost [event]
  • realm pre pause
  • realm pre pause event
  • realm post pause
  • realm post pause event
  • realm player join
  • realm player join [event]
  • realm player language chang(e|ing)
  • realm [player] language (event|change [event])

Examples

on realm boost:
broadcast "A new boost with %realm boost amount% arrived"
on realm player join:
broadcast "%player% joined through %realm join reason%"
on realm player language change:
send "Language changed from %past event-language% to %event-language%" to player