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.
Hope you still reply :p
I set up a command that welcomes a player when he joins.
"[notPoloSim]: Welcome notPoloSim!" is what it looks like in the chatbox after I join,
I would prefer it to look like the server said it everytime someone joins:
"[Server]: Welcome notPoloSim!", "[Server]: Welcome someOtherPlayer"
Is that possible ?
is it possible to set up a command string to run when the LAST person leaves a specific WORLD?
i need to reset a world and reload some plugins every single time an adventure world is empty.
@DarkSoulMC
There are plugins who clear inventories when the players logout.
Also, this plugin offers a Join command, which can be used to clear the players' inventory.
Is there any way to make a command automatically run for every user that has logged into the server? I need my server to clear your inventory on disconnect as to remove glitch abuse with kits.
Any help is appreciated :)
In the description in the beginning it clearly states "Allows the execution of a command simply by respawning " But I can't find it anywhere on the Command summary page. help?
The explanation is TERRIBLE. But it seems like once you know how to use it it would he highly usefull. Cant use it though
Hi,
I am an Op on my favourite sever, and I'm trying to use your plugin to run an op command on the death of a player (a /scoreboard command). In case it is relevant, the server is running 1.7.9 on spigot/bungeecord.
I can set up the op command no problems, and then attach it to a button, where I can then use it as desired, even when de-op'ed.
Where I run into problems, is when I then try to attach the same op command to a death event. It works fine when I am op'ed. But when I am de-op'ed a message appears about not having the required permissions - the same message that appears if I try to do the /scoreboard command in chat when de-op'ed. The same happens when I try to attach the op command to a respawn event.
I'm not a java programmer, but since this is open source, I thought I'd have a look at the code, and see what I could see. I think I've found a possible error/typo, though I've no idea if this is responsible for my problem. Looking at line 40 of death.java (scram8888's version if there is any difference), and comparing it to line 33, there is a difference, with the pattern of line 33 being followed in the other classes (e.g. line 89 & 93 of Join.java). I wonder if the line should read:-
else if(plugin.getCommandMap().get(command + "[op]") != null){
Unfortunately the comparable lines in respawn.java do not show the same (possible) typo, so I fear my issue is not solved by the change I have suggested...
Thanks for reading.
And if you gonna update i hope you do pls pm me
This plugin seems realy nice and i can use for my server but my server is CB 1.7.2 Pls update pls,pls,pls,pls
Could you also add the ability to add a command for when a player respawns? Not just for when they die but also when they respawn?
can you also add, just before a server restart?
Hi there!Nice plugin! I was wondering if you would be kind enough to include execute a command when someone leaves the server.This is something I would really use, but I cannot find it anywhere.You are already close to it, since you can execute when people join.
I would be very thankful! Thanks!
Sylvain
Hello, is there variables for commands ? Exemple :
or
Thank you in advance !
@littlegruz
I'm sorry that i am replying so late but I have another problem now... My method worked, til the 1.6.2 update. Now i am being spawned to the world standard spawn, and after a second or 2 the /respawn is executed and i am beeing spawned at one of the respawn locations. The delay between both spawns is realy annoying. I don't know why it appears now and worked previously, but anyways the GLOBAL variable is still not working. My steps: assigning an identifer to a command: /addacommand spawn /respawn /setrespawncommand spawn GLOBAL Those to steps result in: "No player found with that name."
The plugin is working with my delayed method, so it has nothing to do with my bukkit version...
Edit: My method (at page 2 currently, I've described how i bypassed the GLOBAL variable) has nothing to do with the delay. When i assign the command for only myself, the command is executed 1-2 seconds after the actual respawn. The delay problem is therefor code based.
Edit2: Would it be possible to add an "item right click" option? So like when i right click with a book (not pointing at something, just holding the book in my hands and right clicking) it performs a command just like it does with the onjoin commands and on death commands?
its not /displaystartupcommand its /displaystartupcommands in the desc
For those getting ConcurrentModificationExceptions or the like from repeating commands, get my fixed version here: https://github.com/socram8888/Autorun-Commands
Is it possible to make it to where the repeat commands start the countdown when the server starts and not continue where ever it left off in seconds if the servers been stopped?
i am using the following in the yml file: /addstartupcommand chat mchatdisable
chat being a name i made up, and mchaddisable being an actual command, but it is not working. do i need to add something to the relevant txt file?
@Woordvoerder
Thanks for the kind words :)
@wingsirc
The link to the source has always been at the bottom of the description.
Thank you for this plugin i use it for my server.
Just wanna let you know that this is awesome