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.
is "potato" a legit placeholder for the name of the player who is being targeted? i.e. a person who died?
This plugin looks excellent! I will be testing it out now. ;)
@tfkillzone
Thank you for your kind words! Only a player with OP permissions can use these commands, except for a few of the display commands which anyone can use. As for Permissions support, it has been at the back of my brain for some time now, but due to neat suggestions and life I tend to forget about it. I also need to figure out how to give it such support
@harryjamesuk
If it needs to be run by the player use /addacommand dyn dynmap show to create the identifier otherwise use /addopcommand dyn dynmap. Once you have done that, use /setjoincommand dyn.
@thekillerofevil
Interesting. On the Bukkit forums someone also suggested that. But fear not! It is going be added in the next version.
Are you able to make a command run on the FIRST player join?
Ok,
So I want it to type "/dynmap show" when ANY user joins the server. How do I do this?
Beautiful plugin, built on an incredibly useful concept. Thanks a lot! Only thing I can think of is that I would have to agree with harryjamesuk; Permissions support would be excellent (I'm a standard PermissionsBukkit user). I assume there's some sort of restriction already, right? Can only op's create autorun triggers, or can anyone?
@AkiraShirou
Yeah, you are not alone even after a few redesigns. But fortunately, you do not need to know everything about it to be able to use it. You just need to know how to create an identifier (or handle) for a command you want (Step 1) and then how to add the identifier to a the event you want the command to run at (Step 2).
this plugin looks cool. I read the page... but don't get half of it...
Just a little thing I'd like to see in the future of this plugin, permissions (For me, with PermissionsEx).
@littlegruz
Possible to add a delay per block? Where the player can only activate it once based on the cooldown set.
Thank you!!!! Just what I needed and some extra things which might come in handy ;)
Anyone had any luck using this plugin in conjunction with CommandHelper: http://dev.bukkit.org/server-mods/commandhelper/? I'm not able to get it to call aliases, but I'm unable to tell if this is due to incompatibilities or issues with my implementation.
Thanks
@Killer2demon
Since that limitation is due to a different plugin, there is not much you can do to fix it with this plugin. That is, unless you are able to change someone's class just before the spell cast and then change it back after the cast by telling them to walk over some block or something like that.
@littlegruz
Awesome I managed to get it working.
I'm, trying to get this to work with MagicSpells so when a player steps over a block they cast the spell /cast leap and are sent flying. The issue I'm having is how my permissions are set up classes are not granted all spells (such as leap), because of this when stepping over the block they receive you do not know this spell. Is there any way I can get past this without having to turn on every spell? Seems a stretch but would be awesome if so.
<<reply 706909="">>
Yes. If you want a specific player name, just place it in where you have <player>. If you want the name of the player that is targeted by the command, you place 'potato' where their name should be.
e.g. if you register the command
give potato red_rose 1
to be activated when someone right clicks another player called Bruce, the command that is run will begive Bruce red_rose 1
.Or for your example, it could be /addopcommand -id- kill potato
@littlegruz Edit: What if the command requires the players name to be input as well?
/addacommand -id- kill <player>
would this work?
@anonymous777 use mcmyadmin it has this feature
<<reply 694259="">>
<<reply 694367="">>
Huh. That is a problem.
@Esaych
Yeah, same here.
@littlegruz
Thank you! So I'm guessing there's no other way to do it unless it involves the player's name?