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.
@chlitto
Did you do something like '/setcommandblock random' and then follow the prompt? I am assuming you followed step one (shown above) before this command.
I wanted to make a block that teleports a player to a random warp, so i used MyCommand and made an alias /random which teleports you to one of 50warps, but i get the "Unknown command" when stepping on it.
Can you do something about it?
@sander110419
At the moment I am only willing to drizzle some of my non-work time into my plugins, which at the moment most of this time is going into recreating my RPG plugin.
@egimfun
What is the command you are using?
I am getting the error where I use GLOBAL and it says player not found, im using 3.2.3 and its still broken, please fix this is really important to my server
Hey,
Could you make it possible so we get the following:
When player dies, the player who killed him gets money because the command /money give [killername] [amount] is executed by console.
Could also work like this: when a player kills an entity (other player) a command is executed.
Thanks :D
@PassWordE
Yep, only one command per identifier.
Do the identifier only stored one command? I think it can be a list of commands
@littlegruz
Im getting that same sort of error with the save-all command that comes packaged in bukkit. http://pastebin.com/Q45EGh3T
@cuddyier
I reckon that error is occuring because AC is trying to run those 8 commands from a plugin (or more) that has not been loaded yet. If there are any plugins being loaded after AC, could you please tell me which ones.
EDIT: I just realised why the existance of your comment surprised me. I didn't get an email notification for the post. I wonder if this problem is system-wide.
Why am I getting this error? http://pastebin.com/YnCxbDZM I am using version 3.2.3 and build 771 of spigot.
@beastzone
Well...that is no good. Looks like it happens on startup. Is it the only version of AC in the plugins folder? I am also wondering if the problem is due to the space (or any special characters) in the name of the .jar file.
i dont know about anyone else, but i seem to be getting such a lovely error :0
2013-04-10 16:52:43 [SEVERE] Could not load 'plugins\autorunCommands (1).jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: littlegruz/autoruncommands/CommandMain : Unsupported major.minor version 51.0 at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:184) at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305) at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230) at org.bukkit.craftbukkit.v1_5_R2.CraftServer.loadPlugins(CraftServer.java:239) at org.bukkit.craftbukkit.v1_5_R2.CraftServer.<init>(CraftServer.java:217) at net.minecraft.server.v1_5_R2.PlayerList.<init>(PlayerList.java:55) at net.minecraft.server.v1_5_R2.DedicatedPlayerList.<init>(SourceFile:11) at net.minecraft.server.v1_5_R2.DedicatedServer.init(DedicatedServer.java:105) at net.minecraft.server.v1_5_R2.MinecraftServer.run(MinecraftServer.java:379) at net.minecraft.server.v1_5_R2.ThreadServerApplication.run(SourceFile:573) Caused by: java.lang.UnsupportedClassVersionError: littlegruz/autoruncommands/CommandMain : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(Unknown Source) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader.java:80) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173)
@Dzikoysk
I spent hours on this update due to the significant changes from a new Minecraft version that usually effect this plugin.[/sarcasm] :P
All I did was clarify a startup server error message...and update the version number.
For future reference, this plugin will hardly ever need changing when a new version comes out. It only needed a change once, when the Bukkit event system was changed.
Update it, plz ;)
@Buizel06
It can not be that specific for player joins. The commands will run for anyone who joins the server (or when they first join the server).
Could you tell me how to set the server up so when a player named 'nperl' joins, it will run the command 'changename nperl &eVoltz'?
Love it! Just what I needed!
can you also add an function for an delay. So, player joins, wait 5 seconds, say you joined 5 seconds ago.
@delsolsi213
If you are refering to players typing in and running the Autorun Commands, then they are mostly just only able to be run by an OP player (as described in the commands page here).
I feel it would be useful to point out that you can not have a command run automatically by a player who would not normally have the permissions to run it in the first place. E.g. setting a death event to run a server shutdown by a player who is not an OP.
Please respond if I haven't clarified your query.
@littlegruz
oh and i tried setting it GLOBAL and it still doesnt work,