1. Introduction
The Whippyconomy plugin is a server side economy and auction plugin built using the sponge forge mod.
2. Features
-
Players can pay each other money
-
Charge players money
-
Transfer money between 2 players
-
Pay all players
-
Charge all players
-
2 accounts per player, 1 current account and 1 savings account, and the ability to transfer money between these 2 accounts
-
History of transactions
-
Ability to pay, charge, and transfer using offline players
-
Print out your balance(s)
-
Print the balance(s) rankings
-
Automatic notification of offline transactions when joining server
-
Configurable:
-
Starting ballance
-
Overdraft limit
-
Currency symbol
-
Whether currency symbol comes before or after amount
-
Number of decimal places for the currency
-
Size of transaction history (per player)
-
Minimum amount allowed to be paid to all players
-
Whether to have the savings account feature
-
Whether baltop is enabled
-
-
Ability to auction based on item in hand
-
Can set initial bid, bid increment, buy now price, and duraction of auction
-
Can bid with current bid, and optionally max bid
-
Configurable:
-
Whether auctions are enabled
-
Auction prefix
-
Default bid increment
-
Minimum auction time
-
Maximum auction time
-
Number of auctions allowed to be queued
-
-
Built in fail safes for the auction to ensure winning bidder always gets items, even if disconnected during auction
-
Amount bid/max bid is held in a holding account untill they are either outbid or win the auction. At which time they are refunded the amount they are owed.
3. General Usage
This plugin is designed to be used for the whole economy of the server. It may be integrated with shop plugins which allow you to override the commands the shop pluign is calling. Alternatively though you can use the WhippyShop Plugin which will be released later (or maybe directly integrated into future versions of Whippyconomy).
4. Command Summary
4.1. Economy Commands
Command | Description |
---|---|
Pay money from your account to another player (or all) |
|
Transfer money from one player to another |
|
Charge a player (or all players) money |
|
Check the ballance on your accounts |
|
Print the rankings of ballances on the server |
|
Move money from your current account into your savings account |
|
Move money from your savings account into your current account |
|
Print a list of past transactions you were involved in |
5. Detailed Commands
5.1. Economy Commands
5.1.1. pay
Parameters
5.1.2. transfer
Purpose
The transfer command is used to pay money from one player to another, without either player having a choice. This commands usage is clearly more aimed towards either admins settling a dispute, or for a shop plugin to call directly.
Parameters
5.1.3. charge
Purpose
Like the transfer command this command is to be used by admins or other plugins in order to directly charge a player money, but not give it anyone else. Likely use case is a server shop.
Parameters
5.1.4. bal
5.1.5. baltop
Parameters
Notifications
After running the baltop command the player will received:
Page 1 of 12 for current accounts
1: WhippyCleric: 4658441325
2: mrMisterson: 154888
3: playerNumber4: 45687
4: playerNumber7: 11000
5: fred: 10000
6: im6768ds: 789
7: Steve0: 568
8: nannanananan: 100
9: mrMinecraft: 99.5
10: mrsMinecraft: 99
5.1.6. bank
5.1.7. withdraw
5.1.8. accHistory
Notifications
After running the accHistory transaction you receive a notification like:
1. Paid 50 to mrMisterson 10:56:11 25/11/2014
2. Received 10 from mrMisterson 9:55:55 25/11/2014
3. Was charged 500 9:12:55 24/11/2014
4. Received 76.5 from mrMisterson 16:55:16 30/10/2014
5. Received 95.2 from mrMisterson 12:16:12 16/9/2014
6. Received 58.9 from mrMisterson 3:01:10 15/8/2014
7. paid 100.50 from mrMisterson 15:32:00 26/05/2013
8. Was charged 500 9:12:50 24/11/2012
9. Received 890 from mrMisterson 18:56:01 25/03/2012
10. Paid 12.56 to steve0 19:12:11 25/01/2012
5.2. Auction Commands
5.2.1. auc
Purpose
This is the command used to start an auction of the item currently in the players hand.
Each player may only have 1 auction live or in the queue at one time
Parameters
Required
Index | Description | Data Type |
---|---|---|
1 |
The number of the item to auction |
Numeric |
2 |
The starting bid |
Numeric |
Optional
Index | Description | Data Type |
---|---|---|
3 |
The minimum bid increment |
Numeric |
4 |
The length of the auction |
Numeric |
5 |
The buy it now price |
Numeric |
In order to specify a buy it now price, all the optional parameters must be set.
In order to specify the auction length, the bid increment must be set.
Notifications
After putting an auction in the queue you will receive a notification like:
Auction queued number 1 in line
A typical auction might look like this in the chat:
mrMisterson is auctioning 10 Bones. Starting bid: 1.0. Increment: 1.0. This auction will last 45 seconds. Buy it now for 120.0"
30 seconds remaining
steve0 bids 1.0
fred bids 12.01
Bid has been raised to 15.0
This means someone has bid 15. but it was lower than Fred’s max, so now the bid is with Fred at 15
seteve0 bids 20.0
fred bids 201.0
10 seconds remaining
3 seconds remaining
2 seconds remaining
1 seconds remaining
fred won the auction with a bid of 201.0
Example Usage
To auction 1 of the item in your hand, with a starting bid of 1
/auc 1 1
To auction 10 of the item in your hand, with a starting bid of 50 and minimum increment of 11
/auc 10 50 11
To auction 10 of the item in your hand, with a starting bid of 50, a minimum increment of 11, for 60 seconds
/auc 10 50 11 60
To auction 10 of the item in your hand, with a starting bid of 50, a minimum increment of 11, for 60 seconds, with a buy it now price of 100
/auc 10 50 11 60 100
5.2.2. auc c
Purpose
Used to cancel your auction, either in progress (if more than half the time remains) or the one in queue.
5.2.3. auc i
Purpose
Used to get a notification about the current auction (if there is one) and how many auctions are queued.
6. Configuration
6.1. General Configuration
The configuration of Whippyconomy uses standard Java properties, and the file can be found under config\plugins\whip\config\whippyconomy-config.properties
Key | Description | Data Type |
---|---|---|
currency |
The symbol to be used for the currency |
String |
appendCurrency |
Whether the currency symbol should be appended to the amount (true) or before the amount (false) |
Boolean |
decPlaces |
How many decimal places the currency will have |
Integer |
startingBalance |
Starting balance for new players |
Double |
savingsAccounts |
Whether the savings account feature is active |
Boolean |
maxOverdraft |
The overdraft allowed on current accounts |
Double |
maxTransactionHistory |
The number of transactions per play to store |
Integer |
hasAuctions |
Whether auctions are enabled |
Boolean |
auctionPrefix |
An optional string to print before the auction notificaitons |
String |
maxAuctions |
The maximum number of auctions allowed in the queue |
Integer |
defaultIncrement |
The default increment to be used in auctions |
Double |
minAuctionTime |
The minimum amount of time in seconds someone can hold an auction for |
Integer |
maxAuctionTime |
The maximum amount of time in seconds someone can hold an auction for |
Integer |
defaultAuctionTime |
The default amount of time in seconds an auction will be held for |
Integer |
6.2. Alias Configuration
Every command has configurable aliases, for example you may want to make the command auc cancel
behave the same was as auc c
.
As well as being able to add aliases for the child commands, you can also add aliases for the root command as well, so you can configure auction
to behave the same as auc
Along with all the aliases you are also able to overide the commands completley, for example you can disable auc
completly and specify only auction
is valid. Please ensure to document this for your users
Inside the config\plugins\whip\config\whippyconomy-alias.properties
file you can configure all these options in a list properties defined thus:
Key | Description | Example |
---|---|---|
pay.aliases |
Add additional aliases for the pay command as csv |
pay.aliases:p,sendmoney,bribe |
pay.only.aliases |
Set that only the aliases work, the original pay command will no longer function |
pay.only.aliases:true |
transfer.aliases |
Add additional aliases for the transfer command as csv |
transfer.aliases:tran,swapmoney,forcepay |
transfer.only.aliases |
Set that only the aliases work, the original transfer command will no longer function |
transfer.only.aliases:true |
charge.aliases |
Add additional aliases for the charge command as csv |
charge.aliases:bill,take |
charge.only.aliases |
Set that only the aliases work, the original charge command will no longer function |
charge.only.aliases:true |
bal.aliases |
Add additional aliases for the bal command as csv |
charge.aliases:b,ballance,balance |
bal.only.aliases |
Set that only the aliases work, the original bal command will no longer function |
bal.only.aliases:true |
baltop.aliases |
Add additional aliases for the baltop command as csv |
baltop.aliases:btop,ballancetop,balancetop |
baltop.only.aliases |
Set that only the aliases work, the original baltop command will no longer function |
baltop.only.aliases:true |
bank.aliases |
Add additional aliases for the bank command as csv |
bank.aliases:save,movetosavings |
bank.only.aliases |
Set that only the aliases work, the original bank command will no longer function |
bank.only.aliases:true |
withdraw.aliases |
Add additional aliases for the withdraw command as csv |
withdraw.aliases:extract,movetocurrent |
withdraw.only.aliases |
Set that only the aliases work, the original withdraw command will no longer function |
withdraw.only.aliases:true |
acchistory.aliases |
Add additional aliases for the acchistory command as csv |
acchistory.aliases:extract,movetocurrent |
acchistory.only.aliases |
Set that only the aliases work, the original acchistory command will no longer function |
acchistory.only.aliases:true |
Key | Description | Example |
---|---|---|
auc.aliases |
Add additional aliases for the auc command as csv |
auc.aliases:auction,a |
auc.only.aliases |
Set that only the aliases work, the original auc command will no longer function |
auc.only.aliases:true |
auc.c.aliases |
Add additional aliases for the c command, the child of auc, as csv |
auc.c.aliases:cancel,remove |
auc.c.only.aliases |
Set that only the aliases work, the child command c will no longer function |
auc.c.only.aliases:true |
auc.i.aliases |
Add additional aliases for the i command, the child of auc, as csv |
auc.i.aliases:info,information |
auc.i.only.aliases |
Set that only the aliases work, the child command i will no longer function |
auc.i.only.aliases:true |
bid.aliases |
Add additional aliases for the bid command as csv |
bid.aliases:punt,haveago |
bid.only.aliases |
Set that only the aliases work, the original bid command will no longer function |
bid.only.aliases:true |
6.3. Command Permissions
It is recomended to use Pex for the permissions management below are all the permission nodes for Whippyconomy
Node |
Description |
whippyconomy.pay |
The node to specify who has rights to use the pay command |
whippyconomy.transfer |
The node to specify who has rights to use the transfer command |
whippyconomy.charge |
The node to specify who has rights to use the charge command |
whippyconomy.bal.own |
The node to specify who has rights to check their own ballance |
whippyconomy.bal.others |
The node to specify who has rights to check other players ballances |
whippyconomy.baltop |
The node to specify who has rights to use the baltop command |
whippyconomy.bank |
The node to specify who has rights to use the bank command |
whippyconomy.withdraw |
The node to specify who has rights to use the withdraw command |
whippyconomy.accHistory.own |
The node to specify who has rights to check their own account history |
whippyconomy.accHistory.others |
The node to specify who has rights to check other players account history |
Node |
Description |
whippyconomy.auc |
The node to specify who has rights to use the auc command |
whippyconomy.auc.c |
The node to specify who has rights to use the auc c command |
whippyconomy.auc.i |
The node to specify who has rights to use the auc i command |
whippyconomy.bid |
The node to specify who has rights to use the bid command |
7. Distribution & Licensing
This plugin can be distributed freely and is under GPL license. It is free to use, modify and distribute.
Allthough not required I would ask if re-distributed you credit the original author WhippyCleric, and add a link to the ore page where the plugin is hosted to allow feedback from end users.
8. Contact the Author
Generally I would advise you to put suggestions for improvements or bug reports below. However if you do wish to contact me directly by mail due to innactivity on the forum feel free to mail me at WhippyCleric@gmail.com