OPTokens
OPTokens is a stand-alone economy plugin that allows users to take virtual tokens that can be later used for anything that the admin wants.
Requirements
Since this is a stand-alone economy, you will not require any other modification, that includes Vault.
More Description
OPTokens will create a economy database automatically and allows Admins and people with the token permission to give and remove tokens from players accounts. You can set this up to a buycraft website so players can buy tokens online and with the /token give it will give the players the tokens. Players without the token permission will only be able to check theirs and others balances. The tokens plugin will not do much on its own but can be adapted to do a lot of cool interesting things.
Commands
/token give {player} {amount} - Gives specified amount of tokens to specified player
/token remove {player} {amount} - Removes specified amount of tokens to specified player
/tokens - Displays users tokens//
/tokens {player} - Displays specified players tokens
/tokens pay {player} {amount} - Pays a player a desired amount of tokens
Permissions
tokens - Allows player to use all of the /token commands. Main and only permission
Configuration
The plugin will create a config.yml. This will store the players names/accounts and balances, as well as startingMoney, it will look like this:
###################### # OPTokens # # By ollirules # ###################### ################################################################################################ # If you reload the server, this config will be messed up. To partially fix, open in Notepad++ # ################################################################################################ # The money a player gets when joining for the first time startingMoney: 10 # Whether people using the /token give command have unlimited money. # This is good if you only let admins use the /token commands. tokenUnlimitedMoney: true # Whether a Message is diplayed when a player joins for the first time joinMessage: true
YOU WILL NOT BE ABLE TO CHANGE THE BALANCE THROUGH THE CONFIG.YML If you try to edit the balance amount it will just revert back to what it was before. The only way to change users account balances is in-game. The account balance will always have a decimal point in it.
NOTE: If you reload the server, when opening the config.yml in notepad, it will reformat into one line. To partially fix this, open in Notepad++
To Do
- Welcome Message
- Fix config.yml
Please leave suggestions in the comments or leave a ticket
Donate
Please donate to help me with future projects!
No donation is to small, just anything will help.
Can you make this compatible with CustomEnchant because I want to let my players buy enchants with customenchants with your tokens plugin.
Maybe I can help you out with the API. I made a Token-Plugin with an API too.
It would be very nice, if you can release the API very soon. :)
@PandazNWafflez I realise that but my main priority is not to make it an API. Although if i get enough requests I could see my self doing that in the future, maybe as a separate project.
@ollirules
You say that the plugin can be used as an API, but it's kinda difficult to use it as one when there's no source code or documentation available.
@madtomic Yes is it does.
this work on 1.7.2-r0.3?
@DancingWalrus
Actually the plugin itself can kind of be used as an API as it has the functionality, but even so that's a great idea for a future update. The problem with that as an a update would be if i made the amount configurable, the config.yml would be weird :/
P.S. You'll see the weird config.yml in the upcoming update
Make an API for developers to have ways to add tokens?
Like, if a player is killed. I can add tokens to the killer..
@xFoxOfMinecraft
I don't quite understand what you mean by 'Essentials have {money}', but if you mean is it compatible with default Minecraft scoreboard, then no.
@ollirules
Do this plugin support to scoreboardstats? T.ex Essentials have {money}. What is the code here?
@TheSloowPL
Do you mean I could have created a database on MySQL to save all the tokens on? If so then that would be very overcomplicated for a plugin like this. The config.yml acts as a temporary database to store all the tokens already.
You are created dataBase of MySQL or saving tokens.yml/config.yml ;c
where are the download