Skip to content

Example implementation of custom economy provider for ShopGUI+ using its public API

License

Notifications You must be signed in to change notification settings

brcdev-minecraft/shopgui-api-example-economy-provider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyEconomy - Example plugin using ShopGUI+'s API

This repository contains an example Spigot plugin, MyEconomy, created with use of ShopGUI+'s API. It shows how to correctly implement an in-memory economy provider which will be registered in ShopGUI+ and used for money transactions handling.

Note: This is a very basic implementation of economy and shouldn't be used in production.

Building

./mvnw clean package

Using

After you build the artifact using Maven command above, you can drop in the plugin to the plugins directory of your server along with regular ShopGUI+ plugin and see how it works.

Next, make sure to add CUSTOM economy to your ShopGUI+ config.yml:

economyTypes:
  - VAULT
  - CUSTOM

You can expect this kind of messages during server startup:

[00:02:47] [Server thread/INFO]: [MyEconomy] Enabling MyEconomy v1.1.0
[00:02:47] [Server thread/INFO]: [MyEconomy] ShopGUI+ detected.
...
[00:02:47] [Server thread/INFO]: [ShopGUIPlus] Enabling ShopGUIPlus v1.73.1
...
[00:02:49] [Server thread/INFO]: Done (13.176s)! For help, type "help"
...
[00:02:52] [Server thread/INFO]: [ShopGUIPlus] Registered custom economy provider 'MyEconomy'.
[00:02:52] [Server thread/INFO]: [MyEconomy] Registered economy provider in ShopGUI+!
...
[00:02:52] [Server thread/INFO]: [ShopGUIPlus] MyEconomy economy enabled.

It means that the MyEconomy plugin successfully registered its economy provider in ShopGUI+ and can be used in all or just some of the shops.

About

Example implementation of custom economy provider for ShopGUI+ using its public API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages