Back to Bukkit
Register new account
Essentials Economy is a rather simple implementation of a currency based economy system for Bukkit. ==Commands== There are a number of commands for use ingame, including but not limited to: */eco : Allows you to take / give or reset money. */sell : Sells an item and amount specified. */balance : Gives the current balance of a player. */pay : Pays a specified player from your balance. ==Signs== You can create signs in-game (provided you have access) which will allow players to create trade shops, or simply buy/sell items. [[wiki/signs]] == API == All the following API calls are safe calls. If the account doesn't yet exist but is valid, it will be created. The api code can be found [[https://github.com/essentials/Essentials/tree/master/Essentials/src/com/earth2me/essentials/api| on github]] <<code java>>package com.earth2me.essentials.api;<</code>> Instead of using this api directly, we recommend to use the register plugin:/ http://bit.ly/RegisterMethod === Checking Information === Public accessible methods for checking a players balance. *boolean playerExists(String name) : Confirms an account exists *double getMoney(String name) : Get current balance *boolean hasEnough(String name, double amount) : Checks if the balance would be enough to withdraw the amount *boolean hasMore(String name, double amount) : Confirms the account has more than the amount *boolean hasLess(String name, double amount) : Confirms the account has less than the amount *boolean isNegative(String name) : Checks if the account balance is negative === Altering Information === Public accessible methods for altering a players balance. *void setMoney(String name, double bal) : Set current balance *void add(String name, double money) : Add to balance *void divide(String name, double money) : Divide balance *void multiply(String name, double money) : Multiply balance *void subtract(String name, double money) : Subtract from balance *void resetBalance(String name) : Reset balance to 0 === Tools === Public accessible methods for dealing with currency/economy *String format(double amount) : Formats the cash amount as a displayable string. === NPC === These methods deal with NPC accounts only. *boolean isNPC(String name) : Test if a player is a npc *boolean createNPC(String name) : Creates dummy files for a npc, if there is no player yet with that name. *void removeNPC(String name) : Deletes a user, if it is marked as npc.
The type of markup for this entry.
Click here for details