[MECH] Autorun Commands v3.2.4 - Set custom commands to run automatically [1.5.2-R1.0]

Discussion in 'Archived: Plugin Releases' started by LittleGruz, Oct 24, 2011.

  1. Offline

    LittleGruz

    Autorun Commands - Set custom commands to run automatically
    Version: 3.2.4

    Made in response to this thread.

    Visit the BukkitDev page for more details and downloads.

    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 plugin!

    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 joins
    • Allows the execution of a command when a player first joins
    View the source here.

    Check out my sweet site here.

    Enjoy my mods? Donate here! Dislike my mods? Donate here (and give feedback)! Powers of two are cool (e.g. $1.28, $2.56, etc.).

    Changelog:
    Past versions (open)
    Version 3.2.2:
    • Allow death commands to be set with GLOBAL.
    • Fixed problem of not being able to set OP commands for auto death commands.
    Version 3.2.1:
    • Replaced depreciated code.
    • Fixed some player messages.
    Version 3.2:
    • Option to have a delay for join commands added.
    • Bug fix for OP startup commands.
    Version 3.1.2:
    • Fix for when Multiverse would not load before AutorunCommands.
    Version 3.1.1:
    • Support for the plugin MultiWorld.
    Version 3.1:
    • First join commands.
    • Toggle for first join commands.
    • Multiple join commands executed.
    Version 3.0.3:
    • Fixed bug where respawn commands are executed when player was loading.
    Version 3.0.2:
    • Fixed bug which caused multiple instances of repeat commands to run.
    Version 3.0.1:
    • Fixed bug which occurred if there was no join command.
    Version 3.0:
    • Finally fixed multiworld bug.
    • Added display commands for blocks.
    • Added display commands for repeating tasks.
    • Added display commands for commands.
    • Command blocks can only be destroyed by an OP player.
    • Remembers the time remaining for a repeating task when the server is shutdown.
    • Allows commands to be executed when a player joins.
    Version 2.7.2:
    • Remove repeat command bug fix.
    Version 2.7.1:
    • Bug fix which caused the repeat commands to be saved and read incorrectly.
    Version 2.7:
    • Allows commands to be executed at a set frequency.
    Version 2.6:
    • Allows commands to be executed upon a player's death.
    • A myriad of bug fixes
    Version 2.5:
    • Allows buttons to cause a command to execute.
    • Fixed op command removal.
    Version 2.4.1:
    • Changed event listeners to support the new Bukkit event system.
    Version 2.4:
    • Added op support for command blocks.
    • Added a remove command command.
    Version 2.3:
    • Added ability to set commands to run at server start up.
    Version 2.2:
    • Added the ability to assign commands which are run by an op (console).
    • Allow commands to be executed upon player execution.
    Version 2.1:
    • Made command blocks more responsive.
    Version 2.0:
    • Gave blocks to ability to initiate the execution of a command.
    Version 1.0:
    • Added the ability to have a global command.
    Version 0.1:
    • Release.
     
    sk8r776 and Lextao like this.
  2. Offline

    xmagicx60

    Hmm, I might use this again then, I used another plugin for it ATM, it works quite nicely actually, but this would have more variety in the way i use it.
     
  3. Offline

    LittleGruz

    What's the name of the other plugin? I'm curious to see what other people have done.
     
  4. This is reaaaaaaaally useful for me. Thanks :D
     
  5. Offline

    LittleGruz

    No worries mate.
    I am pleasantly surprised by all these comments about this plugin being useful. So thanks for the support everyone! I will continue developing for you all as long as there's interest or good ideas.
     
  6. Offline

    FerrOHShay

    Awesome! but can you implement permission support :c?. Example PermissionEx?
     
  7. Offline

    LittleGruz

    Would having an alternate version where all the commands (except for the display command) be op only suffice?
     
  8. Offline

    xmagicx60

    Its just a teleport-on-block-step plugin, no biggie, I'd use this one, i just dont want to have to rebuild it all again.
     
  9. yes the plugin has been made but it is in esssentials. its called powertools
     
  10. Offline

    LittleGruz

    Ahh. Thanks for the update.
     
  11. Offline

    Bikkel007

    Nice plugin!
    My question, How can I execute a command by me? So if someone steps on that block, I execute it? At the end of the "noob" spawn I want a block and when people walk over it I want them go get promoted.
    The things is, When I use this command the player itself is executing the command and that's not possible in this case, because you can't promote or demote anybody with the same or higher permissions as you.
    And the one who is walking on that block is always promoting himself and you = you so you can never be higher than yourself.
    So what do I want?
    Let the commands execute by a player (even if he isn't online) or console, because that player / console have the ability to promote.

    I hope you can help me with this!
     
  12. Offline

    ProSkaterBoy96

    Is there a way to have it so when the server starts up it runs a commands?
     
  13. Offline

    LittleGruz

    I thought I had responded to this, clearly I didn't. But I have started working on this.
    Indeed there is. I assume you would like that feature added?
     
  14. Offline

    ProSkaterBoy96

    Yes I would :)
     
  15. Offline

    LittleGruz

    It seems I've spoken too soon. I've tried running commands in various different places during start up but they never amount to anything. So I've come to the conclusion that there is currently no way to have a command run at that point and have requested a feature that would fix that.
    The closest to start up I reckon I could get would be when the first player joins the server. Does anyone think that is too late?
     
  16. Offline

    ProSkaterBoy96

    Well im using a plugin that auto restart the server like every two hours, but I mess with myworlds which unloads all the worlds so I have to load them in manual, but can I have it so when someone joins or does like /warp [map] it loads the map really quick?
     
  17. Offline

    LittleGruz

    Since Minecraft is written in Java, I don't think anything particularly intensive could be done "really quick". But anyway, it is possible to make this plugin also execute a command when a player joins and/or when a player executes a command themselves (which I suppose could lead to infinite loopage).

    In other news. A new version! Version 2.2 to be precise.
    This new version allows players to assign commands that require an op, to assign commands to run when a player dies, to assign commands to players other than themselves and finally, this version now has permissions which prevent any non-op from running any plugin command except for the display commands.

    Oh. My. DOG.
    Show Spoiler

    Two big updates in the same day!? Better go outside and check that the sky isn't falling.
    So, version 2.3 brings in the ability to have commands run right after the server starts up (well, technically one second after start up). The other awesome thing about that is that you can have as many commands running after start up as you like.
    On a side note, I haven't tested commands which take a long time to run. It would be nice if someone who has access to such commands to check if it makes their server slow down much.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  18. Offline

    ProSkaterBoy96

    Thank you!!!!!!!!!!!!! Love it !
     
  19. Offline

    LittleGruz

    Version 2.4 is out!
    This version adds the ability to associate OP commands to blocks.
    It also adds the option to remove a command. One thing to note is that when a command is removed, it gets completely removed from the game. That is, it gets removed from command blocks, players, player death events and the start up list.
     
  20. Offline

    Conderan

    So, what ever came of the permissions or op only version? I'm trying to create something so that when players walk over blocks they get a reward... Don't want every single player able to set it up. Don't want to even have the players otherwise have the commands needed to get the reward either.
     
  21. Offline

    Rossy

    Awesome Plugin! :D
     
  22. Offline

    LittleGruz

    All of the commands (except for /displayclickcommand and /displaydeathcommand) must be run by an op.
    Thanks for that, I'll put better permissions info in the main post.

    Cheers! I'm glad you think so.
     
  23. Offline

    Bikkel007

    Great! Now I want my users to walk over a block, so they get promoted. Normally I type /manpromote [name] whitelisted. Now I typed: /addacommand promote manpromote patato whitelisted
    After that I typed /setcommandblock promote
    and clicked a block. The command is working fine, but in this case the player is executing the command.
    I would like to change this to my player (or like the player has OP rights). Since a player can't promote himself to a higher rank.
    So how do I set up a command associated to a OP ?
     
  24. Offline

    LittleGruz

    If you want to set up a command to be run as OP, you need to use /addopcommand instead of /addacommand. The rest (i.e. using /setcommandblock in this case) is exactly the same.
    I'd recommend removing the non-op command with '/removeacommand promote' first so there wont be a conflict when re-adding it as OP.
     
  25. Offline

    Bikkel007

    Ok thanks for your help! It's working now:) Great plugin!
     
  26. Offline

    LittleGruz

    This new version (2.4.1) is just a housekeeping update so my event listeners support Bukkit's new event system. So there are no new features.
     
  27. Offline

    WC_Shill

    Maybe I am dense, can this plugin be setup to run a specific command with one argument when any player dies as if the player executed the command?
     
  28. Offline

    LittleGruz

    True, you may be dense. However, I am unable to tell over here on my side of the Internet.

    Upon the player's death, a command you have set to run will be run by the player who died. But, if the command you set to run was created with '/addopcommand' (instead of '/addacommand'), then the command will be run by the console.
     
  29. Offline

    WC_Shill

    Maybe this will help.
    This is what I am trying to do.
    Needs to be applied to any and all players on the server.

    Listen for player respawn event
    if event occurs
    get player name
    issue command (as op) removeIsland <playername>
    else continue listening.

    Or

    Listen for player respawn event
    if event occurs
    get player name
    issue command as <player> newIsland <replace>
    else continue listening
     
  30. Offline

    LittleGruz

    I see. The only problem here is that I have not set up a listener for player respawns, only deaths. Since I gather that you will make use of such a feature, I will endeavour to add it to this plugin.
     
  31. Offline

    WC_Shill

    My thanks to you kind sir.
     

Share This Page