Skip to content

Latest commit

 

History

35 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Economy

The "pretty" straight forward api to create an economy for your server

To start of just use the New function

package main

import (
	"github.com/provsalt/economy"
	"github.com/provsalt/economy/provider"
)
func main() {
	e := economy.New(provider.NewSQLite("database/sqlite3.db"))
}

Balance

func main() {
    bal, ohno := e.Balance(player.UUID())
    if ohno != nil {
        panic(ohno) 
    }
    fmt.Println(bal)
}

Increase

ohno = e.Increase(player.UUID(), 500)
if ohno != nil {
	panic(ohno)
}

Decrease

ohno = e.Decrease(player.UUID(), 500)
if ohno != nil {
	panic(ohno)
}

Set

ohno = e.Set(player.UUID(), 500)
if ohno != nil {
	panic(ohno)
}

Close

ohno = e.Close()
if ohno != nil {
	panic(ohno)
}

About

Economy API in golang for dragonfly

Topics

Resources

Stars

10 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages