From 2e42fc327ef2533ebf98e89f20cbeaeb62e87972 Mon Sep 17 00:00:00 2001 From: Indyuce Date: Sat, 31 Aug 2019 20:10:13 +0200 Subject: [PATCH] added string method --- .../java/net/Indyuce/mmocore/api/player/Professions.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/Indyuce/mmocore/api/player/Professions.java b/src/main/java/net/Indyuce/mmocore/api/player/Professions.java index 4d427787..1ebe4b2b 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/Professions.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/Professions.java @@ -55,7 +55,11 @@ public class Professions { } public int getExperience(Profession profession) { - return exp.containsKey(profession.getId()) ? exp.get(profession.getId()) : 0; + return getExperience(profession.getId()); + } + + public int getExperience(String id) { + return exp.containsKey(id) ? exp.get(id) : 0; } public void setExperience(Profession profession, int value) {