ButtonCommands
ButtonCommands
- Version 1.9 -
- # Main Page
- Documentation
- Commands & Permissions Page
- Variables & Color Codes Page
- Config File Page
- White-List Config File Page
- Alias Config File Page
- Source code
Features
- Execute one or multiple commands after a button has been pressed.
- Execute normal commands.
- Execute console commands,using the console command sender.
- Execute redstone triggered commands.
- Execute alias commands, which lets you specify multiple normal or console commands to be ran.
- Command white-list. White-list all or only selected commands. Not for normal button commands.
- Variables. Get inserted before the command gets ran.
- A few somewhat useful commands.
Buttons in relevant positions to command-signs will execute the commands on the signs.
Long version (kind of important): Documentation
This plugin doesn't hook into NMS or CraftBukkit, only the Bukkit API, so it should work on most upcoming Bukkit versions. If there's no big red line somewhere in this description saying it's broken, it isn't yet.
FAQ
Q: Why don't redstone commands work?
A: You or your server is doing it wrong. These three ways work as long as you haven't touched any weird settings and don't use any weird plugins: Three ways of setting up redstone command signs
Q: Why don't something else work?
A: Please check the Known caveats on the latest file (files).
@alexrs98
Replied to one of your three duped tickets...
Have a big problem on my server. I want I want users can use console buttons but can not create them, what happens? Well, I set the permissions and they can create the posters but they put the message that the poster does not have permissions remains the same and can be admin. greetings
No 1.4.7 version? =(
@HuberSepp123
If it's a permission from another plugin, then no. "Console commands" would work for most of those scenarios though.
@jacklink01
Oh really? Awesome, thanks for figuring that out for me. :)
Can you add, that a player, who hasn´t the permission, can take the command, if he´s pressing the button?
@HON95
The issue is fixed in 1.5!
@HON95
I tried messing with the plugin to fix the stuck button issue. First, I tried making the button setPowered(false) after the button is pushed, but it has the same issue and won't set it to powered if there is no one near the button with the chunk loaded.
I looked into the chunk loading api but I couldn't get anything to work, so I just put a delay with the scheduler so that the action from the button press doesn't occur until the button pops back out. It's not that annoying actually, but hopefully just a temporary fix.
@jacklink01
I tried it, and it didn't happen. Are you using any plugins to make the chunks unload faster or something? If it continues to be a problem, I'll probably implement some optional fix for it or something, whenever i get around to work on the next version ... In the meantine, since you know your way around my code and got some spare time on your hands: You can try changing this line from "if (n || !enableBL)" to "if (!enableBL)", and changing "current.hasPerm" to false in the config. It would (if it works) disable the mechanical part of the buttons, but keep the levers (I'm sure you know what I'm talking about) working if you need the redstone signal.
@MinecraftShamrock
Vault? No, it definately does not require Vault. :p
does it require Vault or is it optional?
@HON95
Well the buttons getting stuck has become a pretty big problem on our server. Happens a lot. I don't know that it's because of unloaded chunks, but that's what I would assume.
This issue basically is rendering buttons useless until an admin comes a long, breaks it, and replaces it.
@Pixeldk
Me too. :)
@jacklink01
What bugs are we talking about here (except the buttons getting "stuck")? /:| And hopefully it won't become completely inactive. ;)
@jacklink01
Really? I didn't think chunks unloaded that fast. :P Thanks for reporting.
would love an update :)
@CraftThatBlock
Sort of. Has a few minor bugs. If it becomes inactive, I can help keep it up to date If you would like, HON.
Does this still work in 1.4.7?
Hey HON,
Ive got a small bug to report when using this plugin with 1.4.6. When you use the buttons to teleport a player, because the button sends the command immediately when it is clicked, if there are no other players near the chunk that the button is in, the button will stay pushed in and get stuck in because the chunks were unloaded before the button could unpush itself.
Does that make sense? haha
@iTzTito
Short version, it's not possible without hooking into other plugins and making them allow the user to use the command if it's on a command sign. However, if the plugin allows the console command sender to execute the command with a syntax of "/kit <the_kit> <user>", you can use button console commands: "/c kit <the_kit> {N}".