|Back||For Versions 1.x|
An in depth Configuration Tutorial
# Says different numbers as different people based on world # Permission node: aliasez.command.number number: # In the overworld, say "4" as CONSOLE world: - "!say 4" # In the nether, say "3" as SENDER world_nether: - "@say 3" # In other worlds, say "1" as SENDER and "2" as CONSOLE default: - "@say 1" - "!say 2" # Says hi in green (&a) # Permission node: aliasez.command.hi hi: default: - "!rawmessage * &a%p says hi!" # Echos back the command arguments # Permission node: aliasez.command.echo echo: default: - "!rawmessage %p %@" # Teleports the player to the specified coordinates # Permission node: aliasez.command.goto goto: default: - "!tp %p %1 %2 %3" - "!rawmessage %p &dWoosh!" # This command tells the player hi only if he's in the overworld # Permission node: aliasez.command.world world: world: - "!rawmessage %p hi" # This command runs a specified command in 5 seconds # Permission node: aliasez.command.in5 in5: default: - "in 5 sec @%@" # This command runs a specified command 5 times # Permission node: aliasez.command.5times 5times: default: - "run 5 times @%@" # In version 2.0 and onwards, you can also call an alias from inside another alias # Permission node: aliasez.command.5timesin5 5timesin5: default: - "in 5 sec @5times %@" # You can also escape special characters (such as & and %) by typing them twice # Permission node: aliasez.command.escape escape: default: - "!rawmessage %p Percent: %%" - "!rawmessage %p And: &&&&"
Well let’s start at the beginning. The first label (“number:” for the first entry) specifies the name of the alias. You can use uppercase and lowercase letters, as well as numbers. The first label also is the last part of the permission node for that alias (aliasez.command.commandname or aliasez.command.* for all aliases).
The next level specifies the world. If you want to use different commands in different worlds, you must have a separate label for each world. If no label if found for a world, the plugin will use the “default:” label instead. If you do not want to use multiworld, simply put everything under the “default:” label.
Finally, the list after the world label is a list of commands to execute. The first character of each command must be ! or @ unless you are using a built in Aliasez function. Use ! if you want to execute that command as the console, or @ if you want to execute that command as the sender.
In version 1.1 and later, you can use & to print colored text (“&a hi” would print hi in green).
The following macros are supported:
- %p – player name.
- %@ – all of the command arguments.
- %1 – the first argument. Changing this to %2 would mean the second argument and so on.
- %# (v2.0+) – the number of arguments, excluding the label
For example, if Notch were to type the command /echo Hello World!, %p would be “Notch”, %@ would be “Hello World!”, %# would be 2 (v2.0+), %1 would be “Hello” and %2 would be “World!”.
The following escape sequences are also supported (v1.1+):
- %% = %
- && = &
- :: = : (v2.0+)