split <text> by <separator>since 1.3.0A list of the pieces · split "Coins:500" by ":" gives Coins, 500
set {_parts} to split {_data} by ":"Try it← All of the Docs Working with values
split <text> by <separator>since 1.3.0A list of the pieces · split "Coins:500" by ":" gives Coins, 500
set {_parts} to split {_data} by ":"Try itjoin <list> with <separator>since 1.3.0The elements as one text · join {_names} with ", "
send "Online: " + join server.players with ", "Try ituppercase <text> / lowercase <text>since 1.3.0Changed case · uppercase "hi" gives HI
set {_shout} to uppercase (first 20 characters of {_note})Try ittrimmed <text>since 1.3.0Without spaces at either end · trimmed " hi " gives hi
set {_name} to trimmed argsTry itreplace <a> with <b> in <text>since 1.3.0Every <a> replaced · replace "_" with " " in "diamond_sword"
set {_pretty} to replace "_" with " " in "diamond_sword"Try itreplace regex <pattern> with <b> in <text>since 1.7.20Every part the regular expression fits, replaced · replace regex "\\d+" with "#" in "a12 b345" gives a# b#
on chat:
# Hide anything that looks like an address.
set chat message to replace regex "\\d+\\.\\d+\\.\\d+\\.\\d+" with "[hidden]" in messageTry itregex matches of <pattern> in <text>since 1.7.20A list of every part that fits · regex matches of "\\d+" in "a12 b345" gives 12, 345
command /numbers <text>:
trigger:
set {_found} to regex matches of "\\d+" in args
send "&7Numbers: &f" + join {_found} with ", "Try itregex groups of <pattern> in <text>since 1.7.20What the brackets of the pattern caught in the first part that fits, as a list; the whole part if the pattern has no brackets; empty if nothing fits · regex groups of "(\\w+)=(\\d+)" in "coins=250" gives coins, 250
command /setting <text>:
trigger:
set {_parts} to regex groups of "(\\w+)=(\\d+)" in arg.1
if size of {_parts} is 2:
send "&7" + item 1 of {_parts} + " is " + item 2 of {_parts}Try itfirst <n> characters of <text>since 1.3.0The start of the text · first 3 characters of "Hello" gives Hel
set {_shout} to uppercase (first 20 characters of {_note})Try itlast <n> characters of <text>since 1.3.0The end of the text · last 2 characters of "Hello" gives lo
set {_ending} to last 3 characters of player.nameTry itcharacters <a> to <b> of <text>since 1.3.0A slice, counting from 1, both ends included · characters 2 to 4 of "Hello" gives ell
set {_middle} to characters 2 to 4 of "Hello"Try itlength of <text>since 1.3.0Number of characters · length of "Hello" gives 5
if length of args > 50:
send "&cThat is too long."Try itrounded <number>since 1.3.0The nearest whole number · rounded 2.5 gives 3
send "TPS: " + rounded server.tpsTry itjson of <value>since 1.7.3A list, a local table, a number or text written out as JSON, ready to send · json of ["a", 2] gives ["a",2]
set {_body.player} to player.name
set {_body.coins} to {%player%.coins} + 0
send post request to "https://example.com/hook" with body json of {_body}Try itjson value <path> of <text>since 1.5.2A value out of JSON text; see Web requests · json value "id" of {_response}
log json value "name" of {_json}Try itparse <text> as numbersince 1.5.6The text as a number; unset if it is not one. An amount written short counts: 1.5k is 1500, 2m two million, 1b a thousand million · parse "52" as number gives 52
set {_amount} to parse arg.1 as number
if {_amount} is not set:
send "&cThat is not a number."Try itparse <text> as integersince 1.5.6The same, rounded down to a whole number · parse "7.9" as integer gives 7
set {_whole} to parse "7.9" as integerTry itparse <value> as textsince 1.5.6A number or any other value as text · parse 52 as text gives "52"
set {_label} to parse 52 as textTry itparse <text> as timesince 1.7.47Text such as "1h 30m", "90 seconds" or "2 days and 4 hours" as a duration; unset if it is not one. Also written as duration · parse "1h 30m" as time gives 1 hour 30 minutes
set {_long} to parse arg.1 as time
if {_long} is not set:
send "&cSay how long, such as 1h 30m."
stop
send "&aMuted for %{_long}%."Try itbar of <part> out of <whole>since 1.7.50A bar of ten characters, as much of it filled as part is of whole. Add with <n> characters, using "<character>" and colored "<filled>" and "<rest>" as wanted · bar of 3 out of 10 gives &a███&7███████
send action bar "&7XP " + bar of {%player%.xp} out of 100 to playerTry itrandom text of <n> characterssince 1.7.55Letters and digits picked at random, without the ones that look alike (0 and O, 1 and l): for vouchers and codes · random text of 8 characters gives something like kT7mQ2xp
set {_code} to random text of 8 characters
send "&7Your voucher: &f%{_code}%"Try itrandom code of <n> digitssince 1.7.55Digits only · random code of 4 digits gives something like 0382
set {_pin} to random code of 4 digitsTry itnew idsince 1.7.55An id that nothing else has, 36 characters long · new id
set {_id} to new idTry ittry parse <text> as numbersince 1.7.20The same as parse, for those who like it said: text that is not a number gives unset, never an error. Works with integer and text too · try parse "abc" as number is not set
command /pay <amount>:
trigger:
set {_amount} to try parse arg.1 as number
if {_amount} is not set:
send "&c%arg.1% is not a number."
stop
send "&aPaying %{_amount}%."Try itduration(<seconds>)since 1.5.7Seconds as readable time · duration(125) gives 2 minutes 5 seconds
send "&7Uptime: " + duration(125)Try itcapitalized <text>since 1.7.0The first letter in upper case · capitalized "hello" gives Hello
send capitalized "hello there"Try ittitle case <text>since 1.7.0Every word capitalised; underscores become spaces · title case "diamond_sword" gives Diamond Sword
set {_nice} to title case "diamond_sword"
send "&7You found a %{_nice}%"Try ituncoloured <text>since 1.7.0Without colour codes · uncoloured "&aHi" gives Hi
log uncoloured "&aGreen text"Try itword <n> of <text>since 1.7.0One word, counting from 1 · word 2 of "one two three" gives two
set {_first} to word 1 of argsTry it<text> repeated <n> timessince 1.7.0The text over and over · "=" repeated 20 times
send "&8" + ("-" repeated 20 times)Try it<text> padded to <n>since 1.7.1Spaces added at the end (or in front, with padded left to), for lining things up · "Name" padded to 12
for each {_name} in server.players:
send "&f" + ({_name} padded to 16) + "&e%{%{_name}%.coins}%"Try it<text> shortened to <n>since 1.7.59Cut to that many characters, the last of them …, if it is longer; colour codes are not counted · "Hello world" shortened to 8 gives Hello w…
command /tag <words:text>:
trigger:
set {_tag} to arg.1 shortened to 12
send "&7Your tag: &f%{_tag}%"Try it<text> wrapped to <n>since 1.7.59A list of lines no longer than that, broken between words, each going on in the colour the one before ended in. For lore and signs · {_about} wrapped to 30
command /about:
trigger:
set {_about} to "&7A sword that was made long ago and has never lost a fight."
loop {_about} wrapped to 24:
send loop-valueTry it<text> centered to <n>since 1.7.44Spaces on both sides, so that the text stands in the middle of that many characters; colour codes are not counted · "SHOP" centered to 20
set {_title} to arg.1 centered to 30Try itbetween(text, before, after)since 1.7.44What stands between two pieces of a text; unset if either is not there · between("Hello [world]!", "[", "]") gives world
set {_inner} to between("Hello [world]!", "[", "]")
send "&7%{_inner}%"Try it<text> parsed as numbersince 1.5.9The same as parse ... as number, written after the value; also integer, text, player, offlineplayer · arg.1 parsed as number
set {_amount} to arg.1 parsed as number
if {_amount} is not set:
send "&cThat is not a number."Try it<text> as offlineplayersince 1.7.26A player by name, online now or not. For somebody who has played here it is the name as the server has it; has played before says whether they have. Also written as offline player, parsed as offlineplayer and parse <text> as offlineplayer · "Progamer52" as offlineplayer
command /seen <player>:
trigger:
set {_who} to arg.1 as offlineplayer
if {_who} has not played before:
send "&c%arg.1% has never played here."
stop
send "&7%{_who}% was last on " + last seen of {_who} formatted as "d MMMM yyyy"Try itnow formatted as <pattern>since 1.5.9The date and time, written the way the pattern says · now formatted as "HH:mm" gives 18:30
send "&7It is " + now formatted as "HH:mm"Try iturlencoded <text>since 1.4.0Made safe to put inside a URL · urlencoded "a b&c" gives a%20b%26c
set {_response} to send get request to "https://api.mojang.com/users/profiles/minecraft/" + urlencoded arg.1Try it<text> contains <text>since 1.3.0Whether one includes the other, ignoring case · message contains "help"
if {winners} contains player.name:
send "You already won."Try it<text> + <text>since 1.3.0Joined · "Level " + 5 gives Level 5
set {_greeting} to "Hello, " + player.nameTry it| Syntax | Result | Example |
|---|---|---|
split <text> by <separator> | A list of the pieces | split "Coins:500" by ":" gives Coins, 500 |
join <list> with <separator> | The elements as one text | join {_names} with ", " |
uppercase <text> / lowercase <text> | Changed case | uppercase "hi" gives HI |
trimmed <text> | Without spaces at either end | trimmed " hi " gives hi |
replace <a> with <b> in <text> | Every <a> replaced | replace "_" with " " in "diamond_sword" |
replace regex <pattern> with <b> in <text> | Every part the regular expression fits, replaced | replace regex "\\d+" with "#" in "a12 b345" gives a# b# |
regex matches of <pattern> in <text> | A list of every part that fits | regex matches of "\\d+" in "a12 b345" gives 12, 345 |
regex groups of <pattern> in <text> | What the brackets of the pattern caught in the first part that fits, as a list; the whole part if the pattern has no brackets; empty if nothing fits | regex groups of "(\\w+)=(\\d+)" in "coins=250" gives coins, 250 |
first <n> characters of <text> | The start of the text | first 3 characters of "Hello" gives Hel |
last <n> characters of <text> | The end of the text | last 2 characters of "Hello" gives lo |
characters <a> to <b> of <text> | A slice, counting from 1, both ends included | characters 2 to 4 of "Hello" gives ell |
length of <text> | Number of characters | length of "Hello" gives 5 |
rounded <number> | The nearest whole number | rounded 2.5 gives 3 |
json of <value> | A list, a local table, a number or text written out as JSON, ready to send | json of ["a", 2] gives ["a",2] |
json value <path> of <text> | A value out of JSON text; see Web requests | json value "id" of {_response} |
parse <text> as number | The text as a number; unset if it is not one. An amount written short counts: 1.5k is 1500, 2m two million, 1b a thousand million | parse "52" as number gives 52 |
parse <text> as integer | The same, rounded down to a whole number | parse "7.9" as integer gives 7 |
parse <value> as text | A number or any other value as text | parse 52 as text gives "52" |
parse <text> as time | Text such as "1h 30m", "90 seconds" or "2 days and 4 hours" as a duration; unset if it is not one. Also written as duration | parse "1h 30m" as time gives 1 hour 30 minutes |
bar of <part> out of <whole> | A bar of ten characters, as much of it filled as part is of whole. Add with <n> characters, using "<character>" and colored "<filled>" and "<rest>" as wanted | bar of 3 out of 10 gives &a███&7███████ |
random text of <n> characters | Letters and digits picked at random, without the ones that look alike (0 and O, 1 and l): for vouchers and codes | random text of 8 characters gives something like kT7mQ2xp |
random code of <n> digits | Digits only | random code of 4 digits gives something like 0382 |
new id | An id that nothing else has, 36 characters long | new id |
try parse <text> as number | The same as parse, for those who like it said: text that is not a number gives unset, never an error. Works with integer and text too | try parse "abc" as number is not set |
duration(<seconds>) | Seconds as readable time | duration(125) gives 2 minutes 5 seconds |
capitalized <text> | The first letter in upper case | capitalized "hello" gives Hello |
title case <text> | Every word capitalised; underscores become spaces | title case "diamond_sword" gives Diamond Sword |
uncoloured <text> | Without colour codes | uncoloured "&aHi" gives Hi |
word <n> of <text> | One word, counting from 1 | word 2 of "one two three" gives two |
<text> repeated <n> times | The text over and over | "=" repeated 20 times |
<text> padded to <n> | Spaces added at the end (or in front, with padded left to), for lining things up | "Name" padded to 12 |
<text> shortened to <n> | Cut to that many characters, the last of them …, if it is longer; colour codes are not counted | "Hello world" shortened to 8 gives Hello w… |
<text> wrapped to <n> | A list of lines no longer than that, broken between words, each going on in the colour the one before ended in. For lore and signs | {_about} wrapped to 30 |
<text> centered to <n> | Spaces on both sides, so that the text stands in the middle of that many characters; colour codes are not counted | "SHOP" centered to 20 |
between(text, before, after) | What stands between two pieces of a text; unset if either is not there | between("Hello [world]!", "[", "]") gives world |
<text> parsed as number | The same as parse ... as number, written after the value; also integer, text, player, offlineplayer | arg.1 parsed as number |
<text> as offlineplayer | A player by name, online now or not. For somebody who has played here it is the name as the server has it; has played before says whether they have. Also written as offline player, parsed as offlineplayer and parse <text> as offlineplayer | "Progamer52" as offlineplayer |
now formatted as <pattern> | The date and time, written the way the pattern says | now formatted as "HH:mm" gives 18:30 |
urlencoded <text> | Made safe to put inside a URL | urlencoded "a b&c" gives a%20b%26c |
<text> contains <text> | Whether one includes the other, ignoring case | message contains "help" |
<text> + <text> | Joined | "Level " + 5 gives Level 5 |
command /banner <text>:
trigger:
set {_title} to arg.1 centered to 30
send "&8[&f%{_title}%&8]"
for each {_word} in words of "red green blue":
send "&7%{_word}%"
set {_inner} to between("Hello [world]!", "[", "]")
set {_bar} to lerp(0, 20, 0.25)
send "&7%{_inner}% %{_bar}%"
set {_data} to "Coins:500"
set {_parts} to split {_data} by ":"
set {_coins} to item 2 of {_parts} + 100
send "You have %{_coins}% coins"
parse is how text that came from a player, a file or a web page becomes a number you can rely on. If the text is not a number the result is unset, which is easy to test for:set {_amount} to parse arg.1 as number
if {_amount} is not set:
send "&c'%arg.1%' is not a number."
stop
send, the word title means a title on screen, so put title case in a variable first or in brackets: send (title case {_item}).&a style codes, text may use <#rrggbb> for an exact colour, as in "<#ff8800>Orange <#00c8ff>and blue". It works wherever colour codes do, on Minecraft 1.16 and newer.now formatted as takes Java's date letters: yyyy year, MM month number, MMMM month name, d day, EEEE weekday name, HH hour, mm minute, ss second. "d MMMM yyyy 'at' HH:mm" gives 11 October 2026 at 18:30. Text inside single quotes is taken as it is.split is taken literally, and splitting by "" gives the single characters.item 2 of {_parts} + 100 shows.uppercase (first 3 characters of {_name}).%nl%, or %new line%: send "&6Rules%nl%&71. Be kind". It works in every text: chat, holograms, lore, files, and text in front of a player.