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!


  • 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


  • 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

Command summary page

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.

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of DarkSoulMC DarkSoulMC Jan 14, 2015 at 03:25 UTC - 0 likes

    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 :)

  • Avatar of mr_T_creations mr_T_creations Nov 11, 2014 at 03:42 UTC - 0 likes

    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?

  • Avatar of E1i0te E1i0te Aug 23, 2014 at 19:03 UTC - 1 like

    The explanation is TERRIBLE. But it seems like once you know how to use it it would he highly usefull. Cant use it though

  • Avatar of Jabelpeeps Jabelpeeps May 22, 2014 at 09:38 UTC - 0 likes


    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 (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 I wonder if the line should read:-

    else if(plugin.getCommandMap().get(command + "[op]") != null){

    Unfortunately the comparable lines in do not show the same (possible) typo, so I fear my issue is not solved by the change I have suggested...

    Thanks for reading.

  • Avatar of AppleSnipe AppleSnipe Mar 10, 2014 at 13:48 UTC - 0 likes

    And if you gonna update i hope you do pls pm me

  • Avatar of AppleSnipe AppleSnipe Mar 10, 2014 at 13:45 UTC - 0 likes

    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

  • Avatar of 567legodude 567legodude Feb 06, 2014 at 04:20 UTC - 0 likes

    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?

    BFAK:90909839,4576a7fc325ff31ec4c8422bd2243a3c4a7a3e00128fcd27d04191e54a860e9a ZBDHa16d8e9259c5020b38cffb1af96c3aeb

  • Avatar of Samueljuhasz Samueljuhasz Jan 22, 2014 at 17:26 UTC - 0 likes

    can you also add, just before a server restart?

    My french server IP:

  • Avatar of SylvainSSiri SylvainSSiri Jan 20, 2014 at 02:37 UTC - 0 likes

    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!


  • Avatar of gecko16300 gecko16300 Nov 17, 2013 at 21:21 UTC - 0 likes

    Hello, is there variables for commands ? Exemple :

     /addopcommand TNT_spam give @p 46 64


    /addopcommand TNT_spam give <player> 46 64

    Thank you in advance !



Date created
Oct 25, 2011
Last update
May 05, 2013
Development stage
BSD License
Curse link
Autorun Commands
Recent files
  • R: v3.2.4 for CB 1.6.2-R0.1 May 05, 2013
  • R: v3.2.3 for CB 1.5.1-R0.1 Apr 07, 2013
  • R: v3.2.2 for CB 1.4.7-R1.0 Feb 24, 2013
  • R: v3.2.1 for CB 1.4.7-R1.0 Feb 14, 2013
  • R: v3.2 for CB 1.3.1-R1.0 Jul 22, 2012