Autorun Commands
Want to execute a command which displays stats just by right clicking the desired player? Or how about giving them a rose or 64 many, many times with ease? Or even make a command run which kicks players if they walk over a certain block? You can do that and more with this mod!
Features:
- Allows the execution of a command simply by right clicking on a player.
- Allows the execution of a command simply by walking over a block.
- Allows the execution of a command simply by pressing a stone button.
- Allows the execution of a command simply by dying
- Allows the execution of a command simply by respawning
- Allows the execution of a command at server start up
- Allows the execution of a command on a regular interval
- Allows the execution of a command when a player join
How to use:
Step 1:
- Assign a command to an identifier.
- For this example, we want to say 'Hello <playername>!' and we will assign it the identifier "wassup"
- type: /addacommand wassup say Hello potato!
- Adding the word 'potato' will substitute the name of the player who is the target of the event
OR
- Assign an OP command to an identifier.
- For this example, we want to give me 64 TNT blocks and assign it the identifier "TNT_spam"
- type: /addopcommand TNT_spam give LittleGruz 46 64
Step 2:
- Assign the identifier to an appropriate event.
- For this example we will assign "TNT_spam" to occur every 10 minutes (600 seconds) and to assign "wassup" to be run when a player right clicks another player
- type: /setclickcommand wassup GLOBAL
- NOTE: The use of the word GLOBAL (all caps) means that when anyone right clicks someone, "wassup" will be run instead of just me running it
- type: /addrepeatcommand TNT_spam 600
Step 3:
- Watch them trigger!
- Now if I right click someone called "Bruce". I will execute the command '/say Hello Bruce!'
- And every 10 minutes I will get a full stack of TNT
Future plans:
- Sleep
If you have any comments or questions, please head on over to the forums.
View the source here. Check out the main website here.
Apparently, the lovely Socram8888 has fixed an error in my code that produces ConcurrentModificationExceptions. Get it from Github here.
Please help me! :(
http://dev.bukkit.org/server-mods/click-command/forum/38858-permissions/#p2
Whenever I restart my server the commands set to commandblocks dissapear???
@checked01
So with the command you are using, '/pex user potato group set Worker', is "Worker" the exact spelling (case sensitive as well?) of the group you wanted to set?
Well guys now I have a new problem. I now type /addopcommand Worker pex user potato group set Worker and /setcommandblock Worker And right click on the block. But now when you step on the block it sets you to the default group! Please help
@littlegruz
thank you
@checked01
Using /addacommand means the command gets executed by the player; using /addopcommand means the command gets executed by the console. I suspect you using the former is the problem.
@checked01
And now it says "You do not have the permissions for Apprentice"
Hey guys, I am trying to make it so when you walk over a block, your rank is changed, but an error pops up, and it does not work.
The commands I type: /addacommand Apprentice pex user potato group set Apprentice /setcommandblock Apprentice
The error I get is: Error: For input string: "checked01"
Please help!
@littlegruz
I guess when I say server time I mean GAME time. If someone uses the /time command or sleeps, it messes it up and it doesn't execute at the same GAME time.
@disciple218
It remembers how much time is left for the command to execute if the server is stopped.
i.e. If a repeating command had 7 seconds left to execute and the server stopped, it will wait the 7 seconds before executing once the server has started up again (and the command will continue to repeat as usual).
@littlegruz
I understand all that. My question is will the plugin remember what server time i started the repeat command? If someone sets the time on the server to dawn, for example, will the repeat command still execute at 6:30pm server time, or 600 seconds later in real time?
@disciple218
One second is counted as 20 ticks from Bukkit so you can work out that 12,000 ticks equals 600 seconds. Then it just becomes the task of setting the command to repeat every 600 seconds by starting it at 6.30pm server time.
Note that the command will execute for the first time 600 seconds after you have told it to repeat.
@Royalgamer06
Do you mean signs that run commands by using the text on the sign? If so, due to the request of being able to import existing sign commands, it sounds like a plugin for that already exists.
Awesome plugin!! I have a question (and possible feature request). Is there a way to set up a command to repeat at the same game time? For example, mob spawning on my server needs the /butcher command ran every so often for normal spawning to occur (Bukkit issue, ticket open). I would like to run the /butcher command every game evening at 6:30pm (about 12,000 ticks).
@littlegruz
Thanks! I really appreciate it!
@harryjamesuk
I see now. Basically I would just need to re-implement code I made to stop the respawn commands executing too early. So what you have suggested is possible. It will be added in the next version but not with a configurable time; I will instead give it a similar delay to the respawn commands.
@Nicomang070
That is already on my "to do" list :)
Can you add execution of multiple commands at the same time?
@littlegruz
Well, the reason I'd like it is because I wanted to use "/dynmap show" when a user joins but autorun commands seems to run the command before the plugin has time to activate for the user so it's not really having a use at the moment (I know, this is hard to explain so you'll probably not understand me)
It would also come in handy for things like "In 10 seconds, you'll receive 5 tnt" or something. Or even when you die it would freeze you for 10 seconds then let you carry on.
Possibilities are almost endless :P
Okay so I want to issue this command, pex user <user> group set <group>, when a user runs over a block. I see the command is /setcommandblock <identifier>
But what do I do for the identifier part? also do I have to be standing on the block or looking at the block?
Please help me set this up.
http://dev.bukkit.org/server-mods/click-command/forum/37991-help-with-command-on-block/
@invinciblemode
Indeed
@gabessdsp
Indeed
@harryjamesuk
Indeed...but that is not implemented. I am curious though, in what situations would you want a command to be delayed before running once?
@Jordan0510
Thanks!
Would it be possible to "delay" commands. E.G: The command /dynmap show would be delayed for 10 seconds before it would activate.
So with this plugin could I use a command to change a users permissions when they step on a block in a specific area?