These functions are found in RoyaleEconomy.apiHandler.killCoins:
double getTotalCoins(Player p) » returns the total amount of coins a player has gained from killing entities.
double getCoinsForKey(Player p, String key) and double getCoinsForCustomKey(Player p, String customKey) return the amount of coins for a specific key from the config.
int getCountForKey(Player p, String key) and int getCountForCustomKey(Player p, String customKey) return the amount of entities killed for a specific key from the config.
For the config below:
kill-events:#The list of entity types: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EntityType.htmlevent1:entity-type:'PLAYER'#Permission to get coins from killing this entity#Set to none if u want everyone to be able to get coinspermission:'none'display-name:'&cPlayer'coins-to-give:'15'#After you kill the maximum number you#won't receive any more coins for killing this entity#set 0 for no limitmaximum-kills:1000maximum-reached-message: - '&cYou reached a maximum of kills!' - '&cYou won''t receive any more coins for killing players.' - '' - '&cYou will start to get coins again tomorrow!'event2:entity-type:'ZOMBIE'#Permission to get coins from killing this entity#Set to none if u want everyone to be able to get coinspermission:'none'display-name:'&aZombie'coins-to-give:'5-10'#After you kill the maximum number you#won't receive any more coins for killing this entity#set 0 for no limitmaximum-kills:5000maximum-reached-message: - '&cYou reached a maximum of kills!' - '&cYou won''t receive any more coins for killing zombies.' - '' - '&cYou will start to get coins again tomorrow!'event3:entity-type:'SKELETON'#Permission to get coins from killing this entity#Set to none if u want everyone to be able to get coinspermission:'none'display-name:'&fSkeleton'coins-to-give:'5-10'#After you kill the maximum number you#won't receive any more coins for killing this entity#set 0 for no limitmaximum-kills:5000maximum-reached-message: - '&cYou reached a maximum of kills!' - '&cYou won''t receive any more coins for killing skeletons.' - '' - '&cYou will start to get coins again tomorrow!'#kill events based on entity name#has priority over entity typecustom-kill-events:event1:entity-name:'&aCustom Entity Name'#Permission to get coins from killing this entity#Set to none if u want everyone to be able to get coinspermission:'none'display-name:'&aCustom Entity'coins-to-give:'15'#After you kill the maximum number you#won't receive any more coins for killing this entity#set 0 for no limitmaximum-kills:1000maximum-reached-message: - '&cYou reached a maximum of kills!' - '&cYou won''t receive any more coins for killing custom entities.' - '' - '&cYou will start to get coins again tomorrow!'
You have the keys "event1", "event2" and "event3".
You have the custom keys "event1".
Player p =e.getPlayer();//this returns the coins player p has got for killing other playersdouble playerKills =RoyaleEconomy.apiHandler.killCoins.getCoinsForKey(p,"event1");