Documentation ¶
Index ¶
- Variables
- type Economy
- func (e *Economy) Balance(UUID uuid.UUID) (uint64, error)
- func (e *Economy) Close() error
- func (e *Economy) Decrease(UUID uuid.UUID, amount uint64) error
- func (e *Economy) Handle(h handler.EconomyHandler)
- func (e *Economy) Increase(UUID uuid.UUID, amount uint64) error
- func (e *Economy) Set(UUID uuid.UUID, amount uint64) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEventCancelled = errors.New("event cancelled")
ErrEventCancelled is an error that is returned when the event is cancelled.
Functions ¶
This section is empty.
Types ¶
type Economy ¶
type Economy struct {
// contains filtered or unexported fields
}
Economy is a struct that contains the economy provider and the event handler.
func New ¶
func New(p provider.Provider, h handler.EconomyHandler) *Economy
New creates a new economy instance with a provider.
func (*Economy) Decrease ¶ added in v0.0.6
Decrease is a wrapper for Set that decreases the balance of a player.
func (*Economy) Handle ¶ added in v0.0.6
func (e *Economy) Handle(h handler.EconomyHandler)
Handle adds a new handler to handle economy changes.
Click to show internal directories.
Click to hide internal directories.