Skip to content

LunaTechnika-studio/Economy-Pilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

Economy Pilot

This is a system/api plugin for an economy system for the endstone server software

Features

  • multithreaded SQLite database for fast and simple operations locally
  • External Mysql/MariaDB database support for more advanced users
  • the ability to use commands as an api to interact with other plugins
  • you can use custom symbols for currency

Installation

Drag and drop the .whl file that you can get from releases and put it in your endstone's plugin folder

File Structure

config/
├─ economy-pilot.toml
databases/
├─ economy-pilot/
│  ├─ database.db

- Configuration file `economy-pilot.toml`
- Database file `database.db`

Command usage

  • Player commands

    /balance or /bal - if executed by the player it will give the players current balance

    /pay <username: str> <amount: int> - if executed by the player it will let the player pay money to an another user,
    for example /pay legtibox7811 150

  • Server commands [needs op]
    /serverpay <player: str> <amount: int> - if executed by the server it will transfer money to the players balance,
    for example /serverpay legitbox7811 150

    /serverdeduct <player: str> <amount: int> - if executed by the server it will deduct money from the players balance,
    for example /serverdeduct legitbox7811 150

    /serverbalance <player: str> - if executed by the server it will show the selected player's balance,
    for example /serverlbalance legitbox7811

    /setbalance <player: str> <balance: int> - if executed by the server it will set the players balance to what you have selected,
    for example /setbalance legitbox7811 0

    /deluser <player: str> - if executed by the server it will remove the user's data from the database,
    for example /deluser legitbox7811

    /nukedatabase - WARNING!!! Nukes the database and stops the server

How to use Economy Pilot in your own plugin!

You can use the Economy API in your own python plugin by putting database_issuer file inside your project and using its functions, you can directly run commands to interact with the Economy Pilot's database for better speed

Note! - there are comments inside the python file that explain what each function does and what it needs to work Note! - to make the database_issuer work you will need to add this dependancie in your project under the [project] tag

dependencies = [
  "PyMySQL"
]