Commander
Programming
Dragonphase - designed for mau5ville.com
Additional Credit
If you have experience with Java and creating Bukkit plugins, I will greatly appreciate the help and am interested with working with developers; I will be rewriting Commander to make it easier to use and more efficient to produce code for.
I am currently looking for someone to help me produce a video demonstration of Commander, demonstrating basic and advanced features. Please message me on bukkit if you are interested - a high standard of demonstrative and/or reviewer abilities is preferred. The reason for this is that most people miss the advanced features or don't understand how to use them.
Overview
Commander is a powerful device interface tool used to assign commands, messages and statements to buttons, levers and pressure plates.
Features |
---|
Add and remove multiple commands to buttons, levers and pressure plates |
Manually add and edit existing device data in the devices.yml file |
Check player permissions, items and groups using if-else statements |
Perform commands as player, op or console |
Multi-Perms support - Vault required! |
Add commands to regions - WorldGuard and WorldEdit required! |
How to use
Firstly, make sure you have VAULT installed, as well as any of the permissions plugins it can handle (such as PermissionsEx or bPermissions). This allows permissions detection for all permissions-based systems specified on the Vault page.
Supported Devices
As of right now, only four devices are supported and listed below. Wooden Button will be easy to implement when 1.4 is released. I am currently in progress of developing a tripwire interface system for Commander:
Wooden Pressure Plate, Stone Pressure Plate, Stone Button, Wooden Button, Lever
Command Types
Command Types specify how the command will be run:
Player, Op, Console
You may also use p, o or c Note: it is impossible for non-ops to op themselves using the op command type, as after all commands have been initiated, it de-ops the player. It is possible on a console command type however.
Commands
An explanation of how these commands work is shown when you type the command in-game:
Command | Description |
---|---|
/commander | Display the commander help. You can also use /com |
/commander add | Add commands to the device you are looking at. See Supported Devices |
/commander rem[ove] | Remove commands from the device you are looking at |
/commander clear | Clear the interface of the device you are looking at |
/commander check | Check all associated commands of the device you are looking at |
/commander list | Show a list of all devices in all worlds |
/commander add-entry | Add commands to the region you are standing in |
/commander add-entry(regionName) | Add commands to the region named regionName |
/commander rem-entry | Remove commands from the region you are standing in |
/commander rem-entry(regionName) | Remove commands from the region named regionName |
References
References add a very powerful aspect to the uses of commander. References allow you to display specific traits of the player or the server to the player. References can also be used in messages and statements:
Reference | Description |
---|---|
@player OR @name | Player name |
@group | Player group name |
@world | Player world name |
@time | Player world time |
@level | Player level |
@exp OR @xp | Player experience |
@health | Player health level |
@food | Player food level |
@mode OR @gm | Player game mode |
@server | Server IP |
@region | Name of the region you are standing in |
Conditional references
With commander, you can force the command to continue on to the next command or stop running any further commands. This is useful when adding conditional statements on devices:
Reference | Description |
---|---|
@continue | Continue to the next command |
@return | Do not run further commands |
An useful example of this is:
@in admin>@@You are an admin>@return /give @player 57 1
This will check if the player is an admin - if they are in the admin group, it sends a message to them saying "You are an admin" and then gives them one diamond block. if they are not in the admin group, @return sop any other commands from running.
A little note about conditional references
Commands in conditional references are run the same as any other commands - if you specify it to be run as the player, op or console, it will run them as the player, op or console.
Messaging
This plugin would be pretty useless if it didn't have a method to send custom messages to a player's chat screen. All color code formats are supported:
Reference | Description | Example |
---|---|---|
@@Message | Send "Message" to the player who initiates the device | @@Hello @player! |
Statements
Statements allow you to run a command if a condition has been met, else optionally run an alternate command. This is useful if you want players with a specific permissions node, group or item to run a command:
Statement | Description | Example |
---|---|---|
@check | Check if the player has a specific permission node | @check foo.bar>@@Yes>@@No |
@has | Check if the player has a specific item | @has 35>@@You have wool>@@You do not have wool |
@in | Check if the player is in a specific group | @in moderators>@@You are a moderator>@@You are a @group |
Manually editing devices
Device data is saved to Commander/devices.yml by default. if you are using an earlier version of Commander, simply rename "commands.yml" to "devices.yml":
Editing devices manually is useful when you have created an empty interface and wish to manually add your own commands to the device. This is also useful when you wish to add commands that cannot be entered into minecraft by default, such as long WorldEdit generation commands.
By defaults, commands in the devices.yml file do not contain a forward slash (/). If you want to add a command, simply write it out without the forward slash. With WorldEdit commands, you need to add one forward slash (instead of two):
say hello | Normal /say command |
/wand | WorldEdit wand |
Permissions
Permission Node | Description |
---|---|
commander.device.use.player | Allow players to use player commands on devices (enabled by default) |
commander.device.use.op | Allow players to use op commands on devices |
commander.device.use.console | Allow players to use console commands on devices |
commander.device.break | Allow players to break a device |
commander.admin.add | Add a command to a device |
commander.admin.remove | Remove a command from a device |
commander.admin.clear | Clear a device's interface |
commander.admin.check | Check a device's associated commands |
commander.admin.list | List all devices in all worlds |
commander.admin.reload | Reload commander |
Further Ideas
- I plan to convert all references into statements:
@player Bob>@@You are bob!>@@You are not bob!
@health 20>/give @player 57 1>@@You are not at full health
- Tripwire support
- I have LOOKED INTO adding commands to any block.
Homepage: dragonphase.com
ba55ment: ba55ment.org
@luigi_vampa
make sure that you use the correct spelling, as the references are case sensitive. Additionally, there's an issue whereby all delays occur simultaneously - this can be avoided by setting the second delay to 10 and the third delay to 15. I will be working on a fix for this.
Another question, whats the proper configuration for this -
WOOD_BUTTON_261_113_29_world: op: commands: - '@in Admin>@@You are an Admin>@@You are not an Admin'
I'm getting 'You are not an Admin' regardless of what group I'm in.
Thanks.
Update: Tried this - http://pastebin.com/juxJ4cRT Only the first delay works. The messages are displayed and the command runs just not delays 2 and 3.
@luigi_vampa
Command 1|@delay 5|Command 2
A five second delay between command 1 and 2
Is there anyway to add a delay between commands?
i will make a video at soon as i can ok? :)
an german and an english, but im not so good in talking in english..
@potof411
That's strange, it shouldn't be like that.
Basically when you add a command with or without a / in the game, it automatically removes it for the devices.yml file (because bukkit issues commands without a /)
But because worldedit has two , it would add that to the config with just one /, which should work still.
it works good for me except that I had to modify my devices.yml and replace all the - / by - // for WorldEdit commands.
ex: - /set 0 -> - //set 0
Thanks again !
Hello :D Awesome work love it.
(Just help for overlookers)
Add every permission for players and yourself to use the devices. (commander.device.use.*)
etc. For it to work when its setup , I got stuck on it for a little bit :D
With GroupManager its probs just getting redstonecommandsign plugin, attatch the redstone to the pressure pad and the sign and on the sign do /manuadd (player) (group).
Can you please update this plugin to 1.4.6? :D
im trying this with GroupManger, anyone wanna help me out on how to move someone to a group when they stand on a pressure plate?
@fungreenfox I have been busy with life stuff and university but I will update the Plugin when I have the time. I don't think it will take much, it's probably just a malfunction with the new features in minecraft. Stay tuned!
Well, the head-overview works, i can type COM and get suggestions, i can do a COM CLEAR also, but then it stops reacting, even when i do one of your examples. I have no errors output at all. Its the same when i try the plugin triggercmds or any other of this kind. It all stopped responding same place, after upgrading bukkit to 1.4.4 and now I have 1.4.5 Beta latest. What can you suggest?
Oh yes ! ...pliiiiiiiiiiiiiizzzzzz update !
Please update for 1.4.5
currently commander doesnt add a command to a button. It dissapeared at the 1.4.3 to 1.4.4
Hey my friend, I don't have a problem, everything works fine. I just need to thank you for this plugin. I'm using it since it was released in so many ways on my server. It revolutionized the way my users play. It made so many thinks more comfortable.
New users needed to write an application to become a member on my server, but now, I've built a quiz for them. Question - Left Door - Right door (Both with pressure plates). I added commands to both of them, so that the correct answer tell the player "Right answer!" and the wrong answer executes /Warn @player and sends him back to the beginning of the quiz via /warp world @player Quiz. I am using JOPHwarnings, so i was able to set a two hour ban when a player reaches five warnings. If a player succeeds the quiz a pressure plate promotes him to the User-Group, teleports him to the server-spawn and announces his success to the whole server.
There are so many possibilites. Commander made it to one of my all time favorite plugins. I love it, and my users love it!
Thank you, please, never quit developing this! I'll come up with new ideas for this to help you! :) Thanks man!
@Dragonphase
Working just fine now, not able to do commander.device.use.* (It won't work at all) but adding them individually works just fine. Awesome plugin btw =)
@SmokaCola
Check the main post again - permissions were updated for convenience.
It was working fine when I had permissions added in; however, I updated to 1.5 and now it's like I don't have any permissions. I can use the button as OP, but not as a regular member.