HyperScript
Docs

← All of the Docs More

The server's own counts and lists

expressionstatistic <name> of <who>since 1.7.55

One of the game's own statistics for a player, online or not: "deaths", "jump", "play_one_minute", "mob_kills", "player_kills", "walk_one_cm" and the rest, as the game names them

set {_deaths} to statistic "deaths" of player
send "&7You have died &c%{_deaths}% &7times."
Try it
expressionstatistic <name> of <who> for <thing>since 1.7.55

For the statistics that are kept for each block, item or creature: statistic "mine_block" of player for "stone", statistic "kill_entity" of player for "zombie". Without for, all of them added up

set {_stone} to statistic "mine_block" of player for "stone"
send "&7Stone mined: &f%{_stone}%"
Try it
expressionall commandssince 1.7.55

Every command the server has, each with its slash, as a list

send "&7This server has %size of all commands% commands."
Try it
expressioncommands of <who>since 1.7.55

The ones that player may use

set {_mine} to commands of player
send "&7You can use %size of {_mine}% commands."
Try it
expressionall permissions of <who>since 1.7.55

Every permission a player has, as a list; permissions of <who> says the same

for each {_node} in all permissions of player:
    send "&7- %{_node}%"
Try it
effectgive selection wand to <who>since 1.7.55

A golden axe that marks: left-click a block for the first corner, right-click for the second

give selection wand to player
Try it
expressionselection start of <who>since 1.7.55

The first corner they marked, as a location; unset if they did not

command /makearena <name>:
    permission: op
    trigger:
        if selection size of player is not set:
            send "&cMark two corners with the wand first."
            stop
        create region arg.1 from selection start of player to selection end of player
        send "&aMade %arg.1%."
Try it
expressionselection end of <who>since 1.7.55

The second corner

set {_far} to selection end of player
Try it
expressionselection size of <who>since 1.7.55

How many blocks lie between the two, both included; unset until both are marked

send "&7You marked %selection size of player% blocks."
Try it
effectclear selection of <who>since 1.7.55

Forget both corners

clear selection of player
Try it
expressionsave structure <name> from <position> to <position>since 1.7.55

Keep everything between two corners in a file, as the game's structure blocks do

save structure "house" from selection start of player to selection end of player
Try it
expressionplace structure <name> at <position>since 1.7.55

Put it back somewhere, its lowest corner at that place. rotated 90, 180 or 270 turns it

place structure "house" at player
Try it
expressionstructure <name> existssince 1.7.55

A condition

if structure "house" exists:
    place structure "house" at player
Try it
effectdelete structure <name>since 1.7.55

Remove the file

delete structure "house"
Try it
expressionblock word <text>since 1.7.55

Chat with that word in it is starred, or kept back; a list blocks several

block word "badword"
Try it
expressionunblock word <text>since 1.7.55

It may be said again

unblock word "badword"
Try it
expressionblocked wordssince 1.7.55

The words that are blocked, as a list

send "&7Blocked: %blocked words%"
Try it
Guide and examples
SyntaxMeaning
statistic <name> of <who>One of the game's own statistics for a player, online or not: "deaths", "jump", "play_one_minute", "mob_kills", "player_kills", "walk_one_cm" and the rest, as the game names them
statistic <name> of <who> for <thing>For the statistics that are kept for each block, item or creature: statistic "mine_block" of player for "stone", statistic "kill_entity" of player for "zombie". Without for, all of them added up
all commandsEvery command the server has, each with its slash, as a list
commands of <who>The ones that player may use
all permissions of <who>Every permission a player has, as a list; permissions of <who> says the same
give selection wand to <who>A golden axe that marks: left-click a block for the first corner, right-click for the second
selection start of <who>The first corner they marked, as a location; unset if they did not
selection end of <who>The second corner
selection size of <who>How many blocks lie between the two, both included; unset until both are marked
clear selection of <who>Forget both corners
save structure <name> from <position> to <position>Keep everything between two corners in a file, as the game's structure blocks do
place structure <name> at <position>Put it back somewhere, its lowest corner at that place. rotated 90, 180 or 270 turns it
structure <name> existsA condition
delete structure <name>Remove the file
block word <text>Chat with that word in it is starred, or kept back; a list blocks several
unblock word <text>It may be said again
blocked wordsThe words that are blocked, as a list
command /makearena <name>:
    permission: op
    trigger:
        if selection size of player is not set:
            send "&cMark two corners with the wand first."
            stop
        create region arg.1 from selection start of player to selection end of player
        save structure arg.1 from selection start of player to selection end of player
        send "&aMade %arg.1%."

on blocked word:
    add 1 to {%player%.warnings}
    if {%player%.warnings} >= 3:
        mute player for 10 minutes because "language"
  • Structures need Minecraft 1.17.1 or newer. A structure may have up to 250,000 blocks (limits.structure-blocks); saving a large one makes the server wait. The files are the game's own and lie in the main world's folder, under generated/hyperscript/structures.
  • Blocked words are found however they are dressed up: b4dw0rd, b.a.d.w.o.r.d, baaadword. A word has to stand by itself, so blocking ass leaves class alone. word-filter in config.yml says whether the message is sent with stars (censor, the default) or not sent (block). Players with the permission hyperscript.words.bypass are left alone, and the list is kept through restarts.
  • The wand remembers its corners until the player leaves. It is recognised by a mark on the item, so one that is renamed still works and an ordinary golden axe does not.