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.
After a Serverreload, the blockList.txt will be reloaded and i need to set all command bloks new.
@ablac
Using the example with "potato" as the placeholder, you can have the command run with anyone. If you set the command to "give potato tnt 10" then the name of whoever you right click will replace "potato", just like the example replaced "potato" with "LittleGruz" when LittleGruz was right clicked.
EDIT: I think I have just thought of another way to interpret your question. When you wrote "give it to whoever your right clicking", did you mean the person who you right clicked executes the command instead?
Does this work for anyone, You have an example of when you click on one person but what if you want it to work on Whoever your right clicking? For instance if the command is give tnt 10 can you right click someone and give it to whoever your right clicking?
Have a command that can be call when a player dies, a check for number of player i a world, and a timed commands. I would use this on my sever for setting up a game world. Thank you
@gv1222
If you meant that when a player says something in chat it sends a private message instead to the intended recipient, then it is definitely possible.
But since you only need to use the command '/tell <username>' to PM someone, I wonder about the necessity of adding it into the mod.
That is, of course, if I have understood correctly.
Hey, this looks like a great plugin but is it possible to set it up so that when a player says something in chat it messages them?