A minimal, and simple api to apply economy to your server.
ALL CREDITS GOES TO [Vault](https://github.com/MilkBowl/VaultAPI/tree/master) for the similar implementation to just make familiar everyone
Install and add the plugin to your dependencies on maven / gradle and then to implement it in code just do this.
```java package com.myplugin.coolplugin;
import com.notzerotwo.economy;
public class MyPlugin extends JavaPlugin {
@Override protected void setup() { super.setup(); EconomyManager.RegisterEconomy(new MyEconomy()); getLogger().at(Level.FINE).log("Economy has been setup!"); }
@Override protected void shutdown() { super.shutdown(); getLogger().at(Level.FINE).log("Economy is shutting down!"); }
public void OnMyEvent(PlayerConnectEvent ev) { Economy econ = EconomyManager.currentEconomy;
if(econ == null) return; // econ.depositPlayer(ev.getPlayerRef(), 2500); } } ```
0 Comments