Economy plugin with helper SurvivalCore API.
Please include sql libs for the SurvivalCore API.
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.NazarbekAld</groupId>
<artifactId>SurvivalEconomy</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
You must include
depend:
- "SurvivalCore"
- "SurvivalEconomy"
# AND
loadbefore:
- "SurvivalCore"
- "SurvivalEconomy"
/*
NOTE: Required SurvivalCore
May return null.
*/
EconomyAPI api = getServer().getServiceManager().getProvider(EconomyAPI.class).getProvider();
public class EconomyRegistrations implements Listener {
EconomyAPI api; // Somehow get ins of EconomyAPI
/*
Add 69$ for player breaking gold block (41).
*/
@EventHandler
public void onBreak(@NotNull BlockBreakEvent e){
if (e.getBlock().equalsBlock(Block.get(41))){
api.add(e.getPlayer().getUniqueId(), 69)
}
}
}