eTokens
eTokens
Have you ever wanted to reward you players when they do something such as kill a mob, a player or for earning a hard-to-get achievement?
If so then this is the plugin for you!
eTokens is a fairly advanced system that will allow you to do just that! This project is open-source and, as a result is on Github!! To view this project, just click here or go to https://github.com/TGRHavoc/eTokens
If you're having issues and you've recently updated the plugin. Make sure you have reset the player data cache by deleting the "playerdata" folder inside of the plugin folder (Usually found in "<ServerPath>/plugins/eTokens/").
Please Read
The commands in the shop temporary OP the player. This is to allow them to execute the command they've bought. I was originally going to do this through console however, console doesn't have access to some commands (Player specific).
If players are getting OP through some glitch with this remove the "isCommand" in the shops YAML file (located in plugins/eTokens/shops/Shopname.yml) and contact me immediately so that I can fix the bug.
Updates
- eTokens 2.1
- Players couldn't open shops before as they required to be OP (Thanks to @Gh0stbuster) for pointing this out.
- eTokens 2.1
- Fixed some vital errors
- Players now start with 0 tokens instead of -1
- eTokens 2.0
XML
With this plugin comes a default, easy to configure, XML file that allows you, the server owner, to automatically reward players.
The XML is really easy to grasp. All you need to do is add a "token" tab and tell it what you want to do.
Below are some example and what attribute means what.
XML Attribute | What it does | Values | |
objective | This sets the objective that the player needs to complete in order to receive the token | block-break, kill, achievement | |
token-amount | This is the amount of tokens you want to reward the player with | Any number between 0 and 2147483647 | |
block-amount | This should only be used with the "block-break" objectives, this is how many blocks the player needs to break | Any number between 0 and 2147483647 | |
block-type | The type of block that the user needs to break | See here Can now be "all" for all blocks | |
achievement | This should only be used with the "achievement" objective. This is the name of the achievement that the user needs to get | See here | |
entity-type | This should only be used with the "kills" objective. This is the type of mob that the player needs to kill | See here | |
kills | The amount of entities the player needs to kill | Any number between 0 and 2147483647 | |
repeatable | States whether an objective can be repeated by the player (Currently only works with kills and block-break) | true or false | |
use-tokens | States whether you want to give the player eTokens | true or false (default true) | |
money | The amount of money you want to give to the player (Uses vault) | Any double between 0.0 and Infinity |
Below is an example XML file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <tokens> <token block-amount="10" block-type="DIAMOND_ORE" objective="block-break" token-amount="10"> Well done {PLAYER}, have received {TOKEN-AMOUNT} token(s) for breaking {BLOCK-AMOUNT} {BLOCK-TYPE} block(s)! </token> <token achievement="BUILD_PICKAXE" objective="achievement" token-amount="10"> You have received {TOKEN-AMOUNT} tokens for getting the achievement {ACHIEVEMENT}! </token> <token entity-type="ZOMBIE" kills="10" objective="kill" repeatable="true" token-amount="10"> You have received {TOKEN-AMOUNT} tokens for killing {KILLS} {ENTITY-TYPE}(s)! </token> </tokens>
Commands:
The commands that come with this plugin allow you to control how many tokens each player has.
Command | Description |
/token add <Player> <Amount> | Add a specified amount of tokens to the players' account |
/token [remove/take] <Player> <Amount> | Remove specified tokens to this players' account |
/token set <Player> <Amount> | Set this players token count |
/tokens give <Player> <Amount> | Give this player some of your tokens |
/shop create <Name> | Create a shop with the specified name (Case sensitive) |
/shop add <ShopName> <Price> | Add the currently held item to the specified shop |
/shop <ShopName> | Open a specified shop (Typing in a wrong shop will show available shops) |
/shop command <ShopName> <Price> <Command> | Add a command to the shop with the specified price. Note: Use {PLAYER} where you want to put the player who purchases' name e.g. /kill {PLAYER} |
Permissions:
All commands (Even the /shop) need a permission node before the user can execute it. You can find these permissions and their corresponding commands below
Permission | Command |
etokens.admin | /token add |
etokens.admin | /token [remove/take] |
etokens.admin | /token set |
etokens.give | /token give |
etokens.shop.create | /shop create |
etokens.shop.create | /shop add |
etokens.shop.create | /shop command |
etokens.shop.<ShopName> | This will give the player permission to open the specified shop |
Shop
The shop feature is simple to use that gives you the ability to sell items/commands to the players on your server!] Below is a table with commands that allow you to utilize the shop feature and it gives you a detailed description of what the commands does and what it allows the player to do.
Command | What It Does | What the player can do |
/shop create <Name> | Creates a shop with the specified name (Case sensitive) | Allows the player to open this shop (If they have permission) |
/shop add <ShopName> <Price> | Add the currently held item to the specified shop | Allows the player to buy the item that you're holding for the price that you've set |
/shop <ShopName> | Open a specified shop (Typing in a wrong shop will show available shops) | Allows the player to see the specified shops' contents |
/shop command <ShopName> <Price> <Command> | Add a command to the shop with the specified price. | Allows the player to execute the command when bought |
Donations:
Donations are always welcome. If you feel like donating click the button below:
This looks great, and I can't wait to incorporate it into my server, but one thing I'd like, and maybe others would too, is a permission node for receiving the tokens from the tasks. I want to make this only available in certain worlds, since I have creative, and players could go there and break blocks in creative to get the tokens (unless that's disabled).
Thanks!
@TGRHavoc
It works perfectly! amazing job, keep up the good work!
@MarkVM
Thank you. I have fixed this in the latest update of the plugin (2.7). If you would like to download it and check that everything is working to your satisfaction, I would much appreciate it.
Thanks for the bug report, please next time use the built in ticket system so that these issues can be properly documented. Again, thanks for your time and I'm greatly sorry for any inconvenience caused by this error.
The "repeatable" doesnt seem to work for me on blocks, this is what I have: <token block-amount="100" block-type="ALL" objective="block-break" repeatable="true" token-amount="20">Well done {PLAYER}, have received {TOKEN-AMOUNT} token(s) for breaking {BLOCK-AMOUNT} {BLOCK-TYPE} block(s)!</token> <token block-amount="10" block-type="COAL_ORE" objective="block-break" repeatable="true" token-amount="5">Well done {PLAYER}, have received {TOKEN-AMOUNT} token(s) for breaking {BLOCK-AMOUNT} {BLOCK-TYPE} block(s)!</token> <token block-amount="10" block-type="EMERALD_ORE" objective="block-break" repeatable="true" token-amount="15">Well done {PLAYER}, have received {TOKEN-AMOUNT} token(s) for breaking {BLOCK-AMOUNT} {BLOCK-TYPE} block(s)!</token> <token block-amount="10" block-type="GOLD_ORE" objective="block-break" repeatable="true" token-amount="10">Well done {PLAYER}, have received {TOKEN-AMOUNT} token(s) for breaking {BLOCK-AMOUNT} {BLOCK-TYPE} block(s)!</token> <token block-amount="10" block-type="IRON_ORE" objective="block-break" repeatable="true" token-amount="10">Well done {PLAYER}, have received {TOKEN-AMOUNT} token(s) for breaking {BLOCK-AMOUNT} {BLOCK-TYPE} block(s)!</token> <token block-amount="10" block-type="REDSTONE_ORE" objective="block-break" repeatable="true" token-amount="10">Well done {PLAYER}, have received {TOKEN-AMOUNT} token(s) for breaking {BLOCK-AMOUNT} {BLOCK-TYPE} block(s)!</token> <token block-amount="10" block-type="LAPIS_ORE" objective="block-break" repeatable="true" token-amount="10">Well done {PLAYER}, have received {TOKEN-AMOUNT} token(s) for breaking {BLOCK-AMOUNT} {BLOCK-TYPE} block(s)!</token> It only works once
@madtomic
The latest release is available for 1.7.9, this plugin doesn't use any "special" features that are only for 1.8 versions of Minecraft. If you're having an issue then please, do create a ticket and provide as much detail of the error as possible.
please update for 1.7.9
@TGRHavoc Cool, also, could you add custom Lores for the items? Thanks!
@MrEminent42
Glad to hear you like the plugin!
At the minute, a beacon represents a command. This will however, change in future to allow you to configure your prefered item. This feature is in beta so, expect bugs ;)
Awesome plugin! Can I ask, what represents the command in the shop GUI?
@Azfaloth
Glad to hear you like the plugin :D
Currently it's not compatible with ChestShops however, I have added Vault integration which may provide you with a "work-around" until ChestShop support is added. As for the extra information, hopefully the newly added Shop information will help you.
Great plugin. Simple and versatile. Can I use these tokens with chestshop? And can you also specify a little more about the /shop feature that you have. Thanks :)