MirrorUtils
- Supported Minecraft Versions:
- 1.8, 1.9, 1.10, 1.11, 1.12, 1.13
This resource has a bunch of useful expressions that you might need, mostly related to texts and numbers.
Addons required:
- skript-mirror, skript-mirror and skript-mirror (1.0.0)
Examples:
Code (Skript):
on chat: message regex matches "((http|ftp|https):\/\/)?[-a-zA-Z0-9@:%%._\+~##=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%%_\+.~##?&//=]*)" cancel event send "You cannot send URLs in chat!" Code (Skript):
on command: argument at 2 of full command = "forbidden" send "You cannot use such argument in position 2!" Expressions:Code (Skript):
on load: set {test} to yaml value "message.setmoney" from "config" command /money [<text>] [<text>]: trigger: set (arg 1 parsed as offlineplayer)'s balance to (arg 2 parsed as number) send replacer "<player>" and "<value>" with "%arg 1 parsed as offlineplayer%" and "%arg 2 parsed as number%" in {test}
String
NumbersCode (Skript):
# NEW LINE # Used to add a new line to tab headers/footers and messages. (newline|nl|cr) # REGEX REPLACE # Replaces a regular expression in a string with another string. regex replace %text% with %text% in %texts% # REGEX SPLIT # Splits a string using a regular expression. regex split %texts% at %text% # MATCHER OF STRING # Gets the regular expression matcher in a string. match[er] %text% (to|in|of|with) %text% # REGEX GROUPS OF MATCHER # Gets the regular expression groups from a matcher. # A matcher is obtained from the expression above. [regex] group[s] %integer% of [matcher] %object% # SUBTEXT # Gets the subtext of a string. Exactly like Skript's, but for a single argument sub(text|string) of %text% (from|char[racter][s]) %integer% # EXACTLY EQUALS # Checks if a string is equal to another. # Case sentitive (only reason for it to be here). %text% exactly equals [to] %text% # ARGUMENT AT # Gets the nth element of texts separated by spaces. # Useful for on command events. argument [at] %integer% of %text% # REPLACER # Allows you to replace multiple values at once in a string. # Most useful expression around. (multi[ple] replace|replacer) [(elements|values)] %texts% with %texts% in %text% # RANDOM STRING # Generates a random string with the length specified. random (1¦alphanumeric|2¦alphabetic|3¦numeric|4¦ascii|5¦graph) [(text|string)] [with] (size|length) %integer%
TimeCode (Skript):
# SPACED NUMBER # Returns a string with formatted number. spaced %numbers% # ORDINAL NUMBER # Gives you the number with proper formatting (1st, 2nd, 3rd... 22nd, 24th) ordinal [of] %integer% # SUM PREVIOUS # Sums all the integers smaller than a number N. # Useful for shops that increase the price and allow multiple items bought at once. sum prev[ious] [numbers] of %integer% # ROUND TO # Rounds a number to N decimal places. round %number% to %number% [decimal] [places] # TOP/LAST ELEMENTS # Sorts a variable directly and returns a list of texts with the format used. # Considerably more efficient than any other methods of sorting available in Skript. (1¦(top|first)|2¦(last)) %integer% (values|elements) of %objects% [formatted] as %text% # NUMBER TO ROMAN NUMERAL # Converts a number to a roman numeral. %number% (to|in) roman [numeral] # NUMBER TO WORDS # Converts a number into words. number %number% (to|in) words # FORMATTED NUMBER # Formats a number using symbols to indicate base 10 exponents (k, M, B). formatted %number% [round[ed] to %-integer%] # PI # pi pi
LocationCode (Skript):
# TIME SINCE # Returns the time (seconds) since a unix timestamp. time since %number% # TEXT TO SECONDS # Parses timespans like 1d10h10s. # Incredibly useful for temporary bans/mutes... %text% (to|in) seconds # FORMAT SECONDS # Uses an util to change seconds into any format you want. # Check https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/time/DurationFormatUtils.html. format %number% (into|as) %text% # CURRENT MILLISECONDS # Returns the current time, in milliseconds. [current] m[illi]s[econds]
ItemCode (Skript):
# DIRECTION NAME # Returns the first letter of the direction of a location. (N, S, E, W) # Use "with cardinals" to include SW, NW, NE and SE. direction name of %location% [(1¦with cardinals)] # BLOCKS FROM A TO B # Gets the blocks between two locations. blocks from %location% (to|and) %location%
PlayerCode (Skript):
# ITEM WITH LORE # Returns an item with the lore specified. %item% with lore %text% # HIDE FLAGS # Hides flags of an item. %item% with [(item|hidden|hide)][ ]flags %texts% # ITEM OF ENCHANTMENTS # Exactly like Skript's expression, but works for variables. %item% of %enchantmenttypes% # GLOWING ITEM # Returns a glowing item (glows like it's enchanted, but doesn't show any). glowing %items% # ITEM'S META # Returns the meta of an item. meta of %item% %item%'s meta
Code (Skript):
# DURATION OF POTION # Returns the duration (in seconds) of that potion in an entity. duration of [potion] [effect] %potiontype% (on|of) %livingentity% # TIER OF POTION # Returns the level of the potion applied to an entity. tier of [potion] [effect] %potiontype% (on|of) %livingentity%
Conditions
Text
NumberCode (Skript):
# REGEX MATCHES # Checks if a string matches a regular expression. %texts% [regex] matches %text%
PlayerCode (Skript):
# IMPROVED BETWEEN # Checks if a number is between two others. # Allows < and <=. %number% (1¦\<|2¦\<=) %number% (3¦\<|4¦\<=) %number%
Code (Skript):
# ENTITY HAS POTIONS # Continues if the entity has those enchants in their respective levels. %livingentity% has [potion] [effect[s]] %potiontypes% [level[s]] [%-integers%]
Effects:
Variables
Code (Skript):
# i++ # Basically a shortcut for lazy people who don't like to use "set {_n} to {_n} + 1" # Can also add/remove values that are not 1. %object%(1¦++|2¦--)[%-number%]
There are full descriptions in the file, if you need them.
EWS (TrademarkTM)
-
Welcome to skUnity!
Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.
If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!
Now, what are you waiting for? Join the community now!
Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Script MirrorUtils 1.1.2
Tons of useful expressions and conditions you might need.
Recent Updates
- Bug fixes Mar 29, 2019
- Fixed enchant & formatted number expressions Mar 29, 2019
- Fixes for 2.3.1 and minor changes Jan 14, 2019