-
Notifications
You must be signed in to change notification settings - Fork 1
Macros
Macros are a way to abbreviate long elements on Permission signs, Command signs and Console Command signs. This means that you can write as many permissions or commands on one sign as you want, without having to mess with the space of your Minecraft sign.
Imagine you have a Command sign which should execute 3 commands that make a user a moderator. But there is not enough space on your sign for those 3 commands.
For this you can use a macro that contains those 3 commands in the MagicSigns configuration. If you had to execute the commands /makeuser, /givetheuseracoolnametag and /makemoderator, you could create a configuration like this:
command-macros:
MAKEMODERATOR:
- /makeuser %p
- /givetheuseracoolnametag %p
- /makemoderator %p
(%p will be replaced by the player's name)
This creates a new macro called MAKEMODERATOR that executes your 3 commands.
INFO: Permission signs use the key permission-macros instead of command-macros!
Now that we've created the macro, you probably want to use it on a sign. You can insert a macro by putting the macro's name in dollar-characters ($).
For the macro MAKEMODERATOR this could look like this:
[[[CCommand]|Console Command sign]]
$MAKEMODERAT
OR$
i:SPONGE:23
With this sign users can purchase moderator rights for 23 sponges.
So why did I use [CCommand] (Console Command signs)? Because this way your users don't have to have permissions for the commands to make themselves moderators. If they had, they wouldnt need to purchase it, right?
You can not even only use one macro on a sign, but you also can mix macros and commands on one sign.
You can seperate multiple commands/permissions (depending on what sign you use) and macros by &&.
For example you could create a sign like this:
[[[CCommand]|Console Command sign]]
$MAKEMODERAT
OR$ && /say Hooray!
i:SPONGE:23
This would execute your macro first, after that the other command.