Minecraft/Bukkit/iConomy

From Multiplay Wiki
Jump to: navigation, search

When you've added iConomy to the Plugin list, I recommend that you save without restart and to get the

"plugins/iConomy/Config.yml, plugins/iConomy/Messages.yml or plugins/iConomy/Template.yml and finally plugins/iConomy/VERSION.yml"

config files. Firstly I'm going to walkthrough the config.yml file.

Config.yml

Here is an example of a Config file.

# iConomy 5.0
# %author     Nijikokun <nijikokun@gmail.com>
# %license    GPLv2
# %copyright  Copyright AniGaiku LLC (C) 2010-2011
##
# Setup Notes
#   - Default
#     This node consists of all the 'default' data.
#   - Formatting
#     Allows you to control the output of how you will
#     see the currency in-game with the major/minor features.
#   - Banking
#     Allows users to store money in a seperate location as
#     well as transfer from bank to bank between users
#     - Multiple
#       Allows users to create multiple accounts with banks
#     - Q & A
#       Q: Why?
#       A: Money on hand can be lost, money in banks should not
#           be altered upon plugin specifictions in iConomy 5.0
#   - Interest amount is done in seconds.
#     - Online
#       If only true, only one bank / account will recieve money for that player.
#       If only false, it will go through each bank / account and deposit money.
#      - Announce
#        Sends message each time a player recieves money.
#     - Amount
#       - On
#         Each time interest runs you can either deposit the money into a bank (Interest)
#         or directly into a players holdings (Wage).
#     - Interval
#       - Seconds
#         Basic Table:
#           1 minute = 60 seconds
#           1 hour = 1 minute * 60 = 3600 seconds
#           1 day = 1 hour * 24 = 86400 seconds
#           1 week = 1 day * 7 = 604800 seconds
#   - Database
#     - Type
#       Can only be h2 or MySQL, no longer supports SQLite.
#     - Settings
#       If you choose h2, only the first two are needed, do not alter MySQL.
#       - MySQL
#         Do not use remote databases from free sites, please use either a
#          remote database from a personal hosted VPS or DEDI or a local
#          database. This will prevent any 'timeout' or 'invalid settings'
#          or 'cannot connect to database' issues. Thank you :)!
##

System:
   Default:
       Currency:
           Major: [ 'Coin', 'Coins' ]                # Major ([Major].Minor) 1.00 Dollar (With Seperate 1 Dollar)
           Minor: [ 'Penny', 'Pennies' ]                    # Minor (Major.[Minor]) 0.23 Coins  (With Seperate 0 Dollars, 23 Coins)
       Account:
           Holdings: 100.0                            # Default holdings on hand upon join / creation.
       Bank:
           Name: iConomy                             # Default Bank Name
           Currency:
               Major: [ 'Coins', 'Coins' ]
               Minor: [ 'Pennies', 'Pennies' ]
           Account:
               Fee: 20.0                             # Default cost to register an account
               Holdings: 30.0                        # Default initial account holdings
   Formatting:
       Minor: false                                  # Example (true) 0.23 Coins and 1.23 Dollars (false) 0.23 Dollars and 1.23 Dollars
       Seperate: false                               # Example (true) 1 Dollar, 23 Coins (false) 1.23 Dollars (Only if Minor is true)
   Logging:
       Enabled: false                                # Logs transactions done inside iConomy only, other plugins must utilize the api. (Logs to SQL)
   Banking:
       Enabled: false
       Accounts:
           Multiple: true
   Interest:
       Enabled: false
       Online: true                                  # Only give to players who are online?
       Announce:
           Enabled: false
       Interval:
           Seconds: 60
       Amount:
           Cutoff: 0.0                               # Amount limit to be met until we stop giving interest. (0.0 for no limit)
           On: 'Players'                             # Banks or Players
           Percent: 0.0                              # Percent of holdings to give / take (Negative to take) (Overrides Min/Max)
           Maximum: 1                                # (Range) Maximum amount for random in between. (Make Max/Min equal for a flat-rate amount ie: 5/5)
           Minimum: 2                                # (Range) Minimum amount for random in between.
   Database:
       Type: 'H2SQL'                                 # H2 or MySQL
       Settings:
         Name: 'minecraft'
         Table: 'iConomy'
         MySQL:
             Username: 'root'
             Password: 'pass'
             Hostname: 'localhost'
             Port: 3306

Take note to how the config file is layed out, remember all config files are written in YAML code, if you have a break in the code or at least a failure on a line. Use: [1] to copy and paste your config file into the Checker. You can then use this to help you find where the error or breaks are.


Money

To configure how the iConomy plugin fits with your server, configure the setting just below Default, an example shown here:

   Default:
       Currency:
           Major: [ 'Minecraftian', 'Minecraftians' ]                # Major ([Major].Minor) 1.00 Dollar (With Seperate 1 Dollar)
           Minor: [ 'Minicraftian', 'Minicraftians' ]                    # Minor (Major.[Minor]) 0.23 Coins  (With Seperate 0 Dollars, 23 Coins)
       Account:
           Holdings: 1000.0                            # Default holdings on hand upon join / creation.
       Bank:
           Name: Minecraftian Bank                            # Default Bank Name
           Currency:
               Major: [ 'Minecraftian', 'Minecraftians' ]
               Minor: [ 'Minicraftian', 'Minicraftians' ]
           Account:
               Fee: 25.0                             # Default cost to register an account
               Holdings: 50.0                        # Default initial account holdings


Here in the example I've have changed the

- Coin name for both Major and Minor

- The default Money given to a new player who joins your server.

- The name of the Bank of your server

This config file is completely to your measure, you can change it to fit your server however you see fit.


MySQL and Formatting

iConomy also offers the ability to record all information to a MySQL Database

An example of the rest of the Config look's like this:

   Formatting:
       Minor: false                                  # Example (true) 0.23 Coins and 1.23 Dollars (false) 0.23 Dollars and 1.23 Dollars
       Seperate: false                               # Example (true) 1 Dollar, 23 Coins (false) 1.23 Dollars (Only if Minor is true)
   Logging:
       Enabled: true                               # Logs transactions done inside iConomy only, other plugins must utilize the api. (Logs to SQL)
   Banking:
       Enabled: false
       Accounts:
           Multiple: true
   Interest:
       Enabled: false
       Online: true                                  # Only give to players who are online?
       Announce:
           Enabled: false
       Interval:
           Seconds: 60
       Amount:
           Cutoff: 0.0                               # Amount limit to be met until we stop giving interest. (0.0 for no limit)
           On: 'Players'                             # Banks or Players
           Percent: 0.0                              # Percent of holdings to give / take (Negative to take) (Overrides Min/Max)
           Maximum: 1                                # (Range) Maximum amount for random in between. (Make Max/Min equal for a flat-rate amount ie: 5/5)
           Minimum: 2                                # (Range) Minimum amount for random in between.
   Database:
       Type: 'MySQL'                                 # H2 or MySQL
       Settings:
         Name: 'minecraft'
         Table: 'iConomy'
         MySQL:
             Username: 'bossman'
             Password: 'iamcoollike'
             Hostname: '42.564.76.65'
             Port: 3306


Here I have configured an example of using an MySQL Database and format's what gets logged.

In the example by adding a MySQL Database it will record all the player file and iconomy files to your MySQL Database.

For example "Logging is set to: Enabled: true" Meaning all transactions within the server will be logged and Administrator's will be able to read through them.


Messages.yml

Here is the default Config:


##
# Messaging Template
##
# Variables
#   These are denoted by the + signs before them;
#   Not every line contains the same variables. 
#   To prevent any errors or issues, we have included every variable for each line.
##
# Colors
#   Previously you would use a utf-8 character to use colors, this has been replaced
#   with &[code] or the easier alternative html color brackets: <[color]>
##

# Money Tag [Money] 
tag: "<green>[<white>Money<green>] "

# Personal Account settings
personal:
   balance: "<green>Balance: <white>+balance"
   reset: "<rose>Your account has been reset."
   rank: "<green>Current rank: <white>+rank"
   set: "<green>Your balance has been changed to <white>+amount"
   debit: "<rose>Your account had <white>+amount<rose> debited."
   credit: "<white>+amount<green> was credited into your account."

##
# Player message settings
##
player:
   balance: "<green>+name's Balance: <white>+balance"
   rank: "<green>+name's rank: <white>+rank"
   reset: "<white>+name's <rose>account has been reset."
   set: "<green>+name's balance has been changed to <white>+amount"
   credit: "<white>+name's <green>account had <white>+amount<green> credited."
   debit: "<white>+name's <rose>account had <white>+amount<rose> debited."

##
# Payment messages
##
payment:
   self: "<rose>Sorry, you cannot send money to yourself."
   to: "<green>You have sent <white>+amount<green> to <white>+name<green>."
   from: "<white>+name<green> has sent you <white>+amount<green>."

##
# Statistics
##
statistics:
   opening: "<green>-----[ <white>iConomy Stats <green>]-----"
   total:  "<gray>Total +currency: <white>+amount"
   average: "<gray>Average +currency: <white>+amount"
   accounts: "<gray>Total Accounts: <white>+amount"

##
# Interest Message
##
interest:
   announcement: "+amount <green>interest gained."

##
# Account Creation
##
accounts:
   create: "<green>Created account with the name: <white>+name<green>."
   remove: "<green>Deleted account: <white>+name<green>."
   status: "<green>Account status is now: <white>+status<green>."
     
##
# Top-list Ranking
##
top:
   opening: "<green>Top <white>+amount<green> Richest Players:"
   empty: "<white>   Nobody yet!"
   line: "<white>   +i.<green> +name <white>(<green>+balance<white>)"
 
##
# Errors
##
error:
   online: "<rose>Sorry, nobody else is online."
   exists: "<rose>Account already exists."
   account: "<rose>Player does not have account: <white>+name"
   funds: "<rose>Sorry, you do not have enough funds to do that."


By looking at the default config, you can personalise every message in the server relating to iConomy in this Config File.

By using <colourname> tag's you can also add different colours to the messages

For Example: "<yellow>It appear's you do not have the funds to complete this transaction."

Would make the Whole of the message in yellow, lets config it more:

For Example: "<yellow>It appear's you do <red>not <yellow>have the funds to complete this <green>transaction."

Not entirely necessary but just shows how customizable your in game messages can be.


Template.yml

Depending on which iConomy version you run on, depends on which config file is given.

Here is an example of the template.yml config file

Just like the Message.yml it is exactly the same with customizing it.

##
# Messaging Template
##
# Variables
#   These are denoted by the + signs before them;
#   Not every line contains the same variables. 
#   To prevent any errors or issues, we have included every variable for each line.
##
# Colors
#   Previously you would use a utf-8 character to use colors, this has been replaced
#   to make your lives easier, there are 3 different methods of adding color to your lines
#   each orchestrated for a different personality type.
#
#   Whichever is easiest for you to remember; They all do the same, and you can mix and match.
#
#   Methods: &[code] or `[name-code] or the easier alternative InEquality Signed color brackets: <color>
#
#   Color Mapping:
#     &c `c Color     &c `c Color
#     -- -- -----     -- -- -----
#     &0 `k black     &f `w white
#     &1 `B navy      &a `g lime
#     &2 `G green     &b `a aqua
#     &3 `A teal      &c `r rose
#     &4 `R red       &d `p pink
#     &5 `P purple    &e `y yellow
#     &6 `Y gold
#     &7 `s silver
#     &8 `S gray
#     &9 `b blue
#
#     For black would be: <black> or `k or &0
#     Example using Inequality: <green>Hi I'm green! <white>Now White!?
#     Example using &: &2Hi I'm green! &fNow White!?
#     Example using `: `GHi I'm green! `wNow White!?
#     Example using all: `GI'm Green, &fWhite, <yellow>and Yellow!
##
# Additional Tag for Interest Announcement
#   +bank,+b = Shows bank name
##

tag:
   money: "<green>[<white>Money<green>] "
   bank: "<green>[<white>Bank<green>] "

banks:
   create: "<green>Created bank <white>+name<green>."
   remove: "<rose>Deleted bank <white>+name<rose>."
   purge:
     bank: "<rose>Bank <white>+name<rose> was purged of inactive accounts."
     all: "<rose>All banks were purged of inactive accounts."
   set: "<green>Changed <white>+key<green> on <white>+bank<green> to <white>+value<green>."

personal:
   balance: "<green>Balance: <white>+balance"
   reset: "<rose>Your account has been reset."
   rank: "<green>Current rank: <white>+rank"
   set: "<green>Your balance has been changed to <white>+amount"
   debit: "<rose>Your account had <white>+amount<rose> debited."
   credit: "<white>+amount<green> was credited into your account."
   bank:
       balance: "<green>+bank Balance: <white>+balance"
       charge: "<green>You payed <white>+amount<green> for the account."
       sent: "<green>You sent <white>+amount<green> from <white>+bank<green> to <white>+name<green>."
       deposit: "<green>You deposited <white>+amount<green> into <white>+bank<green>."
       withdraw: "<green>You withdrew <white>+amount<green> from <white>+bank<green>."
       transfer: "<green>Transferred <white>+amount<green> from <white>+bank<green> to <white>+bankAlt<green>."
       between: "<green>Transferred <white>+amount<green> from <white>+bank<green> to <white>+name<green> at <white>+bankAlt<green>."
       change: "<green>Changed main bank to <white>+bank<green>."
       recieved: "<green>Your account with <white>+bank<green> had <white>+amount<green> credited."

player:
   balance: "<green>+name's Balance: <white>+balance"
   rank: "<green>+name's rank: <white>+rank"
   reset: "<white>+name's <rose>account has been reset."
   set: "<green>+name's balance has been changed to <white>+amount"
   credit: "<white>+name's <green>account had <white>+amount<green> credited."
   debit: "<white>+name's <rose>account had <white>+amount<rose> debited."
   bank:
       balance: "<green>+name's Balance with +bank: <white>+balance"
       recieved: "<white>+name's <green>account had <white>+amount<green> credited."

payment:
   self: "<rose>Sorry, you cannot send money to yourself."
   to: "<green>You have sent <white>+amount<green> to <white>+name<green>."
   from: "<white>+name<green> has sent you <white>+amount<green>."

statistics:
   opening: "<green>-----[ <white>iConomy Stats <green>]-----"
   total:  "<gray>Total +currency: <white>+amount"
   average: "<gray>Average +currency: <white>+amount"
   accounts: "<gray>Total Accounts: <white>+amount"
   bank:
       accounts: "<gray>Total Bank Accounts: <white>+amount"

list:
   banks:
       opening: "<green>Page #<white>+amount<green> of <white>+total<green> pages (<white>F: Fee<green>, <white>I: Initial Holdings<green>)"
       empty: "<white>   No Banks Exist."
       all-entry: "<green> +name [F: <white>+fee<green>] [I: <white>+initial<green>] [<white>+major<green>/<white>+minor<green>]"
       fee-major-entry: "<green> +name [F: <white>+fee<green>] [I: <white>+initial<green>] [<white>+major<green>]"
       major-entry: "<green> +name [I: <white>+initial<green>] [<white>+major<green>]"
       entry: "<green> +name [I: <white>+initial<green>] [<white>+major<green>/<white>+minor<green>]"

interest:
   announcement: "+amount <green>gained from interest."

accounts:
   empty: "<rose>Deleted <white>all<rose> accounts."
   purge: "<rose>All inactive accounts were purged."
   create: "<green>Created account with the name <white>+name<green>."
   remove: "<green>Deleted account: <white>+name<green>."
   remove-total: "<green>Fully deleted: <white>+name<green>."
   status: "<green>Account status is now <white>+status<green>."
   bank:
       create: "<green>Created account for <white>+name<green> with <white>+bank<green>."
       remove: "<green>Deleted account <white>+name<green> from <white>+bank<green>."

top:
   opening: "<green>Top <white>+amount<green> Richest Players:"
   empty: "<white>   Nobody yet!"
   line: "<white>   +i.<green> +name <white>(<green>+balance<white>)"

error:
   online: "<rose>Sorry, nobody else is online."
   exists: "<rose>Account already exists."
   account: "<rose>Player <white>+name<rose> does not have account."
   funds: "<rose>Sorry, you do not have enough funds to do that."
   bank:
       fee: "<rose>Sorry, this banks fee is more than you are holding."
       exists: "<rose>Sorry, that bank already exists."
       doesnt: "<rose>Sorry, bank <white>+name <rose>doesn't exist."
       couldnt: "<rose>Sorry, bank <white>+name <rose>couldn't be created."
       account:
           funds: "<rose>Sorry, your account doesn't have the funds."
           maxed: "<rose>Sorry, you already have a bank account."
           none: "<rose>Sorry, no accounts found."
           doesnt: "<rose>Sorry, no account with the name <white>+name<rose> exists."
           exists: "<rose>Sorry, an account like that already exists with us."
           failed: "<rose>Sorry, failed to create account. Try again..."


Commands

The 2 main commands are:

/money

/bank

For a full list of commands please see: [2]


Permission Nodes

If you don't have permission set up yet, read the page wiki at: [3]

The current Permission Nodes and What they do are as follows:


 iConomy.access

Gives users access to iConomy (/money)

 iConomy.admin.account.create

Admin access to create a user account


 iConomy.admin.account.remove

Admin access to remove a user account


iConomy.admin.bank.create

Admin access to create a bank


iConomy.admin.bank.remove

Admin access to create a bank


iConomy.admin.bank.set

Admin access to modify bank attributes


iConomy.admin.empty

Admin access to empty the database…USE WITH CAUTION


iConomy.admin.grant

Admin access to give money


iConomy.admin.hide

Admin access to hide/show an account


iConomy.admin.purge

Admin access that removes all accounts with initial holdings


iConomy.admin.reset

Admin access to reset a player account


iConomy.admin.set

Admin access to set a player balance


iConomy.admin.stats

Admin access to check all iConomy stats


iConomy.bank.access

Allows users access to /bank


iConomy.bank.deposit

Allows a user to deposit into a bank account


iConomy.bank.join

Allows a user to join a bank creating an account


iConomy.bank.join.multiple

Allows a user to join multiple bank accounts (Required to join a bank if multiple is on)


iConomy.bank.leave

Allows a user to leave a bank and delete their account account


iConomy.bank.list 

Allows users to list all the banks


iConomy.bank.main

Allows a user to view their main bank


iConomy.bank.main.change

Allows a user to change their main bank


iConomy.bank.main.set

Allows a user to set their main bank


iConomy.bank.main.view

Allows a user to view the main bank their account is with


iConomy.bank.transfer

Allows a user to transfer money to another player's bank


iConomy.bank.transfer.multiple

Allows a user to select the bank to take money from to transfer to another player's bank


iConomy.bank.withdraw

Allows a user to withdraw money from a bank


iConomy.list

Allows listing of the richest player
  

iConomy.payment 

Allows a player to send money to another player as "payment"
 

iConomy.rank

Allows listing a rank of the top charts


If you are reading this, then congratulations on installing, configuring and gaining knowledge on how to use iConomy within your server! Now go make some money!

If you are stuck at all or need more help, please drop an email by at: supre@omgwtfhax.info