Wulf
Basic economics system and economy API

Supported Games

Economics is a basic economics system that other plugins can make use of the provided API. On its own, this plugin only provides the features listed and has no shop.

Permissions

  • economics.balance -- Allows player to use the balance command for other players
  • economics.deposit -- Allows player to use the deposit command
  • economics.setmoney -- Allows player to use the setmoney command
  • economics.transfer -- Allows player to use the transfer command
  • economics.withdraw -- Allows player to use the withdraw command
  • economics.wipe -- Allows player to use the ecowipe command to wipe data
  • economics.admin -- Allows player to use all admin commands (old, deprecated and will be removed)

Commands

This plugin provides universal chat and console commands. When using a command in the chat, prefix it with a forward slash: /.

  • balance -- Check your balance (does not require or use a permission)
  • balance <name> -- Check [name] player balance (requires economics.balance)
  • deposit <name> <amount> -- Deposit [amount] to [name] player (requires economics.deposit)
  • setmoney <name> <amount> -- Set balance to [amount] for [name] player (requires economics.setmoney)
  • transfer <name> <amount> -- Transfer [amount] to [name] player (requires economics.transfer)
  • withdraw <name> <amount> -- Withdraw [amount] from [name] player (requires economics.withdraw)
  • ecowipe -- Wipe all saved Economics data, including balances (requires economics.wipe)

Configuration

"Allow negative balances for accounts (true/false)": false -- Set to true to allow negative balances (less than 0) for accounts

"Maximum balance for accounts (0 to disable)": 0 -- Set to a number above 0 to prevent account balances over this amount

"Remove unused accounts (true/false)": true -- On server start, players with the default balance are removed

"Start money amount (any number 1 or above)": 1000 -- Amount of money a player starts with

Localization

For Developers

double Balance(string playerId)
double Balance(ulong playerId)
bool Deposit(string playerId, double amount)
bool Deposit(ulong playerId, double amount)
bool SetBalance(string playerId, double amount)
bool SetBalance(ulong playerId, double amount)
bool Transfer(string playerId, string targetId, double amount)
bool Transfer(ulong playerId, string targetId, double amount)
bool Withdraw(string playerId, double amount)
bool Withdraw(ulong playerId, double amount)

Credits

  • Nogrod, for the original C# version of this plugin
  • Bombardir, for the original Lua version of this plugin

    MIT License


    Copyright (c) 2019 Wulf


    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:


    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.


    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.


    Download
    Donate
    6.8K downloads
    183 watchers

    economyeconomicsapimoney