Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Those that use MCMA to manage permissions probably know that you need to run two commands, one to add a player to the new group and one to remove them from the old group.
- I created a new group for my promotions called OldTimers and I wanted to auto-promote from the Regulars group, so first of all I defined two commands in rewards.yml; my commands section looks like this:
- commands:
- - oldtimeradd:'pushcommand addmember OldTimers [player]'
- - oldtimerrem:'pushcommand delmember Regulars [player]'
- Next I created the rewards to trigger from the console and then edited them to modify the tags for my own use.
- I wanted to auto-promote at 7 days, exclusive to Regulars, with a custom message, so I ended up with this in rewards.yml
- rewards:
- - S,E,T,P,null,default,6,23,59,0,0,0,-1,C,0,oldtimeradd,CMDoldtimeradd
- - S,E,T,P,null,promomessage,7,0,0,0,0,0,-1,C,0,oldtimerrem,CMDoldtimerrem
- The first reward triggers at 6days 23 hours and 59 minutes and runs the command to add a player to the new group. At this point, MCMA still treats them as though they are at the lower rank.
- The second reward triggers 1 minute later (I found that running them both at 7 days didn't always have time to write the permissions file successfully).
- The second reward removes them from the lower rank, which effectively completes the promotion and sends the player a custom message defined in messages.yml like this:
- message:
- promomessage:
- lines: 4
- line-1: '&6 Congratulations [player] !'
- line-2: '&6 You have been auto-promoted'
- line-3: '&6 and can now set 2 homes.'
- line-4: '&6 If you do not have your new tag, then contact an Op'
- Line 4 tells them to contact an Op if it didn't work as there is a potential for them to not be promoted. This is because the delmember command is case sensitive, so if they were in the lower rank but their player name was the wrong case, they can't be removed, so an Op will need to manually go into McMyAdmin and just remove them from that group and the promotion will be complete.
- Finally, I added permissions for the Regulars group to allow them to receive the rewards
- ontime.reward.CMDoldtimeradd
- ontime.reward.CMDoldtimerrem
- I also added deny permissions on Ops and Admins just in case
- -ontime.reward.CMDoldtimeradd
- -ontime.reward.CMDoldtimerrem
- McMyadmin Auto-Promote working thanks to OnTime, thanks! :D
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement