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.
@Tetdoss
The error stack trace is always very helpful since it tells me where the problem is, so I do not have to waste large amounts of time looking for what may have caused it. So when you can send the console error, please link it (from pastie.org or something like that). Thanks.
Hi littlegruz, I have an error when the server is starting.
I typed: /addopcommand checkvip ws checkvip and: /addrepeatcommand checkvip 120 and I restarted the server...
I can't send you the console erreur atm, but if you really need this, tell me :)
@TheNicklander
It is not currently possible to bind more than one command to a button.
Can I bind 2 (or more) commands to a button, will be helpfull. Thanks !
Can you add another option for autorun commands after X seconds of play time? Like once they play 2 hours it runs /rankup <player>
@Aeleos
Ah, I see. It is a bug, you did it all correct. I think I may have found it.
@Warhawker: Still no fix for your problem
I am trying to make it so when on my server a person respawns it automatically runs the command /recover so they get there stuff back. but when i do the command /setrespawncommand die (die being the /recover command) GLOBAL it just says no player found with that name. Am i doing something wrong or is it a bug. thanks for you help.
I also get this error every time it saves, It still works fine though.
It seems it stopped working on my tekkit 3.1.2 bukkit 1.2.5 server. I had it auto running save-all every 60 seconds.
@littlegruz
I really hate plugins that make use be OP, I try and use a no-op system because it helps with hackers. Is there any hope in the future for you to add permission nodes? Or even just one permission node to do everything?
EDIT: But please note I do love your plugin so very much :) just the forced OP usage is what I hate.
@preid2905
Well, all the commands for this plugin (unless mentioned otherwise) require an OP player to run them.
Unless you meant, stopping normal users from triggering events which cause your commands to run.
Is there a way to stop normal users using this? We only want admins to be able to use it; a response would be grreatly appreciated.
@VietNg
To be honest, I have only had to edit my plugins once in an entire year due to changes in the Bukkit event system. So I will be surprised if this plugin does not work with 1.3.1 straight away, but I will still check it to make sure it works when the new RB is released.
@Nanor_131
Hi,
I'm a big fan of your work on this plugin and I hope you will consider continuing this project and update to 1.3.1 soon :)
Two quick questions:
@TheDante
It is possible, but not implemented in this plugin.
@littlegruz
Is it possible to run a command when a first user connects to an empty server ?
This would be a great help.
greetings
@austinwangg
Thanks a lot!
I believe all possible arguments for all commands are given in the command summary page.
Simply replace the name of the player with 'potato':
e.g. `/addopcommand example kit tools potato` would make an identifier for your `kit tools <player who clicked button>` command. Then you can use `/setcommandblock example` to assign the command to your button.
Just wanted to say you are an awesome developer. You make so many awesome plugins!
EDIT: Would you mind posting all possible arguments? Like <playername> and such? EDIT 2: How would I make someone click a button and also enter their name in it? For example, I want someone to click a button and make it run "/kit tools <player who clicked button>"
@harryjamesuk
Thank you! Praise is always gratefully accepted :)