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

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 lordmogulus lordmogulus Aug 28, 2015 at 11:48 UTC - 0 likes

    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.

  • Avatar of dvargas135 dvargas135 Jun 24, 2015 at 03:03 UTC - 0 likes

    @DarkSoulMC: Go

    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.

  • 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

    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.

  • 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: MineRP.minecraft-home.com

Facts

Date created
Oct 25, 2011
Category
Last update
May 05, 2013
Development stage
Release
License
BSD License
Curse link
Autorun Commands
Downloads
15,530
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

Authors