AbilityTrader
About
AbilityTrader allows your players to buy and rent commands and permissions using an economy or experience points.
This plugin was created because the server I run has a particular problem with a few players having significantly more money than the rest, so having this plugin allows them to get a few more features and reduces their balance accordingly.
Setup
Copy AbilityTrader.jar into your plugins directory. The first time it runs, a configuration file will be created in AbilityTrader/config.yml. You should edit this to add abilities that you want to sell or rent to players.
Permissions
abilitytrader.use- Allow players to use AbilityTrader (default: true)abilitytrader.showhidden- Allow players to see hidden abilities in the list (default: op)abilitytrader.admin.reload- Reload the configuration (default: op)abilitytrader.admin.players- See a list of players and abilities they have (default: op)abilitytrader.admin.add- Add abilities to players (default: op)abilitytrader.admin.remove- Remove abilities from players (default: op)abilitytrader.admin.*- Provides showhidden, reload, players, add and remove permissions (default: op)
Commands
There are very few commands for AbilityTrader - type /ability help for a short list. All of these work (with the exception of info, rent and buy) on the console as well as in-game.
For administrators, you can view a list of players with abilities by typing /ability players - this will show all players with abilities, along with their expiry times if applicable. You can also reload the configuration file with /ability reload if you make any changes to the file itself.
Administrators are also able to remove player abilities without having to manually edit the file. To do this, type /ability remove <player> <ability>. You will see error messages if something goes wrong.
Administrators can also give abilities to players by typing /ability add <player> <rent/buy> <ability> <true/false>. The true/false at the end determines whether AbilityTrader should charge the player for the ability (it won't charge the administrator).
Alternatively, you can use /ab, /at or /abt as a shortcut to /ability.
Configuration
The default configuration is as follows:
log: false
page_results: 10
global:
commands:
add: []
remove: []
abilities:
workbench:
description: No need for real workbenches any more!
permissions:
- essentials.workbench
commands:
add: []
remove:
- msg {0} Removing workbench ability
rent_cost: 100
duration: 300
me:
description: Say stuff third-person style
permissions:
- essentials.me
commands:
add: []
remove: []
buy_cost: 5000
rent_cost: 15
duration: 60
hat:
description: Look dapper in your choice of hat
groups:
add: Fashionable
remove: PREVIOUS_GROUP
permissions:
- essentials.hat
buy_cost: 1000
players: []
You should add abilities that you want to buy or rent under the abilities section. Keep the ability name short and meaningful. You can expand on what the ability provides with the description.
Each ability can assign zero or more permissions to players. If you don't want to give any permissions, just set this to permissions: [].
Each ability can also execute commands when abilities are added and removed (when players buy/rent, and when they expire, if rented). Again, this can be one or more commands, or none at all. You can use the placeholder {0} to pass the player's name to the command. This is useful if you want to message them when the ability is removed, etc. The commands should not have a slash (/) at the start, and will be run automatically when a player buys or rents an ability, and run automatically when abilities expire or admins remove them from players, if any remove commands have been specified. You can also use additional placeholders for commands - {1} is the ability name, {2} is the price of the ability (if they rented, it'll be the rent price - if they bought, it'll be the buy price), and {3} is the same as {2} except it includes currency formatting (i.e. adding $ to the amount, or however you have your economy setup. If you're using experience, it will suffix the cost with 'exp'). Global commands can be run as well as or instead of individual ability commands. The special placeholders work here too.
You can specify a rent price and buy price with money or experience, either individually or together. If renting, simply call this rent_cost. For buying, it's buy_cost, and if you want to allow buying and renting of the ability, just specify both options. If you prefer to use experience points rather than an economy system, use buy_exp and rent_exp.
The duration specifies (in seconds) how long a player will have the ability for. After this time, the ability will be removed and any remove commands will be executed. The duration only applies to rentable abilities.
Each ability can optionally move players to and from groups when adding or removing the ability. You can only specify one group when adding or removing (multiple groups wouldn't make sense). An example can be seen for the hat ability above. This example uses the special keyword _PREVIOUSGROUP - if that's specified for the 'remove' group, AbilityTrader will assign the player's previous group to them when removing the ability. This is useful if you have a complex hierarchy of groups.
You can add hidden: true to an ability if you don't want players to see it in the list (or on their info screen if they already have it). This is ideal if you're testing abilities or don't want players to have access to certain abilities. Any players with the abilitytrader.showhidden permission will be able to see these (op by default). Administrators can give hidden abilities to regular players if necessary.
You should avoid modifying the players section - this tracks which players have abilities, when they were given and when they will expire (if they were rented).
Other
AbilityTrader runs a task every minute to remove expired abilities - you may notice that /ability info may still show these if they have expired but the task hasn't run yet.
This is my first Bukkit plugin and the first time I've used Java, so please bear in mind that this won't be perfect and may well have bugs. Having said that, I have tested it on one production server without any issues, as well as extensive testing on a development machine.
If you find any bugs or would like to suggest features or improvements, please click the Tickets link above.
If you would like to test this plugin, you're welcome to connect to PlayPyxis.com in-game and use the commands above.
Check out my other plugin, AreaTP if you want to allow your players to create their own public warp points.
-
View User Profile
-
Send Message
Posted Aug 20, 2017Question, Is there a possibillity to just give the players the abillity without a trad?
because i searcherd for a good-for-abillities plugin that allows me to just make abillities without making so much crap. I just ask if there is a command that allows the owner or someone else with a permisson to give someone the abillity. If there is a command please say which because it would save my time and my put.
Btw, if what i have writte is hard to read, sorry. I'm german
-
View User Profile
-
Send Message
Posted Nov 21, 2016Can you update this to work on 1.11 Thanks
-
View User Profile
-
Send Message
Posted Feb 16, 2016Is there a way to use it with a command like...
/give $player diamond 1?
The $player would mean that each players name would replace it. Meaning when you type that the server would see /give <your-user-name> diamond 1.
-
View User Profile
-
Send Message
Posted Dec 14, 2015Can you update it to Bukkit 1.8?
-
View User Profile
-
Send Message
Posted Jul 20, 2015I will work on it coming up in the next month. Thanks for the idea!
-
View User Profile
-
Send Message
Posted Apr 24, 2015Wither
-
View User Profile
-
Send Message
Posted Oct 4, 2014I am sorry I just got this my email wasn't working I will be more then glad to look into creating something like that I will first work on updating to 1.7.10 then I will work on the NPC Quests
-
View User Profile
-
Send Message
Posted Aug 25, 2014This is a very cool and great plugin.
@andrewdougherty: A first thought of a next update would be the support for UTF-8 language files. So I can adjust it to German or whatever... Or the Support of WorldGuard flags... So that you can say some abilities are just available in some regions (if the flag is set) or just work in that region. Or Citizen2: Imagin a NPC could give you abilities in a Quest kind story...
-
View User Profile
-
Send Message
Posted Aug 22, 2014-
View User Profile
-
Send Message
Posted Jun 14, 2014Update?
-
View User Profile
-
Send Message
Posted Aug 28, 2013@mbcx2
Do you mean an API that other plugins can use? If so, not at the moment.
-
View User Profile
-
Send Message
Posted Aug 28, 2013Is there an API to let you give players abilities from the API instead of letting the console run the command?
-
View User Profile
-
Send Message
Posted Jul 23, 2013Sorry for the delay updating - a new version (0.9.0) has been uploaded, but is also available on GitHub :)
This should work on 1.5.2 and 1.6.2, but has only been tested on 1.6.2
-
View User Profile
-
Send Message
Posted May 30, 2013@SonarBeserk
I'll add admin commands to the help.
Players are only notified if there is a message command in the 'add' section of the commands in the configuration. I'll look at adding a separate option for this.
I'll add a verbose option to toggle logging to console.
Thanks for your feedback :-)
-
View User Profile
-
Send Message
Posted May 25, 2013Could you add admin subcommands to the help?
Also people given commands dont seem to be notified of that. Also when a player is given an ability it is still logged that they bought the ability. and moving those messages to a verbose would also be helpful.
-
View User Profile
-
Send Message
Posted May 15, 2013Hey, is there a way to use signs to sell these abilities? So I would have it in like a spawn shop or something :P I basically want to sell the ability to use /spawner set for a certain amount of time.
-
View User Profile
-
Send Message
Posted Jan 28, 2013@owyoushotme
What's the server log showing, and what Bukkit version are you running?
-
View User Profile
-
Send Message
Posted Jan 28, 2013I'm having a problem where my server fails to load the plugin. Any help will be appreciated!
-
View User Profile
-
Send Message
Posted Jan 26, 2013@ryanthemagi
The ability use permission is enabled by default, so you would need to negate this with PEX for any groups who shouldn't have access to it. I don't know how you'd do this with PEX, but with Essentials Group Manager, it's a case of adding '-abilitytrader.use'.
I hope that helps - if not, let me know :)
Edit: Just seen your edit but will keep this here
-
View User Profile
-
Send Message
Posted Jan 26, 2013Hey I'm having a bit of trouble with permissions. It seems anyone can use any of the /ability commands despite not having the permission node. Using PEX for permissions and running 1.4.7.
EDIT: I used the permission node -abilitytrader.use instead and it disables the perms