OPTK 1.6: Economy Happens

 

Hullo!

Onion here. Coinciding with our update to 1.6, OPTK will be going through a fairly extensive update as well.

Many changes are being made to the plugin, some of which I have been harassed to add for some time.

Such as an expanded /optinfo command. Renamed to /who, this command now prints a gaggle of information about the player in question.
It is also available to regular players in a more limited form.
To an admin, /who prints out the player's name, location, time last logged in, current health, economy balance, known IPs, and OPTK induced conditions.
To a normal player, it prints out name and time last logged in.
This command can be called without a player specified, in which case it lists all information pertaining to the player who called the command, admin or otherwise.
Usage:

/who [player]

Also, a few tweaks have been made to the assorted OPTK player-affecting commands, and a variant of the infamous teleport block has been created for inventory viewing, and protection thereof.

 

Finally, to the largest change yet... Economy Support! Now, to the meat of the matter!

 

OPTK ECONOMY

This will work on a significantly different principle than the iConomy you may be used to. With this economy system, not every item will be convertible to currency. In fact, only one item will be convertible: Gold Ingots.
Likewise, there are only two ways to convert currency to items: withdrawing gold bars, or paying another player for sundry items.

User Controls

Every player has a balance, and can manipulate its contents at will.

/money

Prints your current balance

/deposit [# bars]

Converts given number of gold ingots into currency, adds it to your balance, and removes them from your inventory. If you have 5 bars and try to deposit 10, only 5 will be deposited.

/withdraw [# bars]

Withdraws given number of gold bars from your balance. Likewise, if you have 5 gold bars worth, and try to withdraw 10, only 5 will be withdrawn.

/pay [player] [amount]

Pays money from your balance to the specified player. If you try to pay more money than you have, no payment will occur. The same for wise-ass attempts to pay negative values.

Admin Controls

For the admins in the house, here's your controls. Mind, the /add and /transfer commands will be governed as strictly as /i and /give. Spawning was, and is, illegal. This is equivalent to spawning.

/add [player] [amount]

Adds specified amount to specified player's balance.

/subtract [player] [amount]

Subtracts specified amount from specified player's balance.

/transfer [player_from] [player_to] [amount]

Tranfers specified amount from the first player's balance to the second player's balance.

/who [player]

Not technically an economy command, but this can be used to view a player's current balance. Included for completeness.