BananaCrafts Economy plugin
@GetterpublicclassMainextendsJavaPluginimplementsListener {
privateCoinsAPIcoinsAPI;
@OverridepublicvoidonEnable() {
coinsAPI = CoinsAPIPlugin.INSTANCE.getCoinsAPI();
Bukkit.getPluginManager().registerEvents(this, this);
}
//Gives player 500 coins on first join.@EventHandlerpublicvoidonJoin(PlayerJoinEventevent) throwsSQLException {
Playerp = event.getPlayer();
if (!coinsAPI.doesPlayerExist(p.getName())) {
coinsAPI.addCoins(p.getName(), 500);
}
}
}