ButtonPromote
ButtonPromote - Use buttons/pressureplates to give users various features!
Version: v3.1.0 (Updated by Furt) - 7/18/15
Sourcecode |
Issue Tracker |
FaQ |
Test Builds |
Join me on IRC @ irc.esper.net/5555 #buttonpromote
ButtonPromote allows the use of simple and easy-to-remember commands to make your buttons promote, message, give/take currency, give/take items, and/or warp the players who click them.
Features:
- Use buttons/pressureplates to promote players who press them
- Use buttons/pressureplates to send messages to players
- Use buttons/pressureplates to warp players to another location
- Use buttons/pressureplates to perform commands
- Use buttons/pressureplates to give/take items
- Use buttons/pressureplates to give/take currency
- Can set buttons/pressureplates to only be used once
- Multi-world compatibility
- Vault support for permissions and economy
Dependencies
Required:
- Vault
- Permission plugin - PermissionsEX recommended
Optional:
- Economy plugin
Commands:
- /bp - Shows commands in-game.
- /bp setpromotion <group> - Type this command, then press a button to make it promote users to specified group.
- /bp setmessage <message> - Type this command, then press a button to make it send your message to players. Colorcodes and spaces do work!
Uses: - "/bp setcommand tp %p furt-slap furt" This will tp the player clicking the button to furt then slap him
- "/bp setmessage Hello!-Welcome to the server!-Enjoy your stay!" This will output:
- Hello!
- Welcome to the server!
- Enjoy your stay!
- /bp setcommand <command> - Type this command, then press a button to make it perform a command on a player.
- /bp setwarp - Type this command at the location you want, then press a button to make it warp users to that location.
- /bp setpermission <permission.touse> - This is used to give custom permissions per button.
- /bp setitem <give/take> <itemname> <amount> - This is used to give/take items from a player that right clicks it.
- /bp setcurrency <give/take> <amount> - This is used to give/take currency from a player that right clicks it.
- /bp setusage <true/false> - This feature is for giving a button a one time use.
- /bp remove - Type this command, then press a button to remove promotions and warps.
- /bp confirm - Confirms button removal on block break.
- /bp cancel - Cancels all current selections.
Permissions:
- buttonpromote.use - Permission to use promoter and warper buttons.
- buttonpromote.create - Permission to use /bp set and /bp setwarp commands.
- buttonpromote.remove - Permission to use /bp remove command.
Configuration:
# Set this to true to make buttom promote add to permissions instead of replace keepOldGroups: false # Set this to true to make every button created one time use globalOneTimeUse: false # Set this to true to make buttons use console for commands instead of player consoleCommands: false # Warm up time for warp, in seconds warpTimer: 3
To-do / Upcoming Features:
- Give me your suggestions for more features!
Changelog:
v3.0.0
- Updated to 1.5.2
- Fixed config generation in some cases.
- Added all new buttons and pressure plates.
v2.2.2
- Added the ability to make commands use console instead of player in the config
v2.2.1
- Resolved most issues with /bp setitem take, this feature now cancels the button event if they do not have the required item or amount.
v2.2
- Added a config file for the following:
- globalOneTimeUse - Default: false - If set to true this will cause all buttons newly created to be set to true for one time use feature.
- keepOldGroups - Default: false - If set to true this will keep old groups a player has instead of removing them with a promotion button is used.
- New Features:
- ButtonPromote now supports pressureplates!
- You can now set multiple messages and commands
- /bp setcommand now has variables that can be used to mark player name or world name player name = %p and world name = %w
Im in the process of adding more features, depending on what iMint thinks of it i may start a new plugin for it bc its growing out of the name ButtonPromote ;P
Im waiting for money giving feature ^^
Would my idea be feasible to incorporate? Could you just use the code for the buttons and apply them to levers and Pressure Plates' 'on' signals? That would extend the use of this plugin a lot. However, if it's not doable, it's still great you guys got it to work up till this point already. I'm loving it every day!
You should add a Shop feature. Like, a sign that is linked to a button and shows the information how much and what items does the button sell... There are plenty plugins with sign and chest shops, but you should implement feature so it looks neat with no commands and so that it looks nice and is simple to understand what is being sold... Not like b 999:122...
In lieu of a 'Tickets' page I'll post this here...
Apparently we are unable to remove promotion/warp buttons using the /bp remove command, we get the following error spam on the console whenever we try (and nothing happens in-game)...
2012-06-15 08:51:44 [SEVERE] Could not pass event PlayerInteractEvent to ButtonPromote org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:304) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:177) at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:287) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:637) at net.minecraft.server.Packet15Place.handle(SourceFile:39) at net.minecraft.server.NetworkManager.b(NetworkManager.java:229) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:114) at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:83) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:569) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:461) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) Caused by: javax.persistence.OptimisticLockException: Data has changed. updated [0] rows sql[delete from bp_button where id=? and world=? and x=? and y=? and z=? and message=? and command=? and group_name=? and warp_world=? and warp_x=? and warp_y=? and warp_z=? and warp_yaw=? and warp_pitch=?] bind[null] at com.avaje.ebeaninternal.server.persist.dml.DmlHandler.checkRowCount(DmlHandler.java:123) at com.avaje.ebeaninternal.server.persist.dml.DeleteHandler.execute(DeleteHandler.java:81) at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:105) at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.delete(DmlBeanPersister.java:67) at com.avaje.ebeaninternal.server.persist.DefaultPersistExecute.executeDeleteBean(DefaultPersistExecute.java:128) at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeNow(PersistRequestBean.java:535) at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeOrQueue(PersistRequestBean.java:557) at com.avaje.ebeaninternal.server.persist.DefaultPersister.delete(DefaultPersister.java:654) at com.avaje.ebeaninternal.server.persist.DefaultPersister.delete(DefaultPersister.java:464) at com.avaje.ebeaninternal.server.core.DefaultServer.delete(DefaultServer.java:1831) at com.avaje.ebeaninternal.server.core.DefaultServer.delete(DefaultServer.java:1821) at me.iMint.ButtonPromote.ButtonApi.clearButton(ButtonApi.java:223) at me.iMint.ButtonPromote.ButtonListener.onButtonPress(ButtonListener.java:46) at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ... 13 more
@MultiBana
Im considering adding economy support buttons, but let me get command buttons squared away first ^^
I'm checking this plugin daily, waiting for you to make buttons take money from you to use and perform commands for you.
MAKE IT
@_InnoKo_
NP iMint I will do my best to keep the plugin updated for you. Also i have a pull request for u on github.
@CMinecrafter1
Yea im gonna have to go back thru the code and add a parser for names. Also noticed the command buttons are using permissions so im gonna have to fix that issue aswell.
Sorry guys, I was gone for a while. Thank you so much Furt for rewriting and updating it while I was gone!!
@Furt
Also, let's say I'm using Setrank PEX, how would I use /bp setcommand to set it to /setrank theirusername user. Would it be something like /bp setcommand setrank %NAME user ?
@Furt
Hi I downloaded that and added the perms to the correct group, but it still only works with ops. I've deopped and set myself as default to test it... :/ I've even done /bp reload and redone the buttons.
Just use /bp setcommand if u want it to do that
@Furt
Can you make a version where instead of adding a group to a player, it promotes them up the ladder(PEX)?
Repost:
Unofficial update: v2.0
Fixes:
Download: ButtonPromote.jar Source: GitHub
Hey whats up? Um I didnt see an option to post a ticket so im just going to comment. Love the idea behing the plugins i needed something like this. Only problem is is that I cant figure out why when a guest logs into the default group where the -buttonpromote.use is allowed they cant press the button. Admins with the '*' permission can so I know it works.
imint update the plugin?
uhm Furt? Download: DropBox Source: GitHub is dropbox the new one jar ?
@Furt
Took awhile to understand that message was for me.. Thank you very much, i really like this plugin. :) , nice to get it working
@Furt
Check my comment