From a7c5836f8230bbd76c1f8d23b1387170d901a6ff Mon Sep 17 00:00:00 2001 From: jascotty2 Date: Tue, 20 Aug 2019 13:02:17 -0500 Subject: [PATCH] add enabled check to economy --- .../com/songoda/core/library/economy/EconomyManager.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/songoda/core/library/economy/EconomyManager.java b/src/main/java/com/songoda/core/library/economy/EconomyManager.java index abe1cfc6..2503468b 100644 --- a/src/main/java/com/songoda/core/library/economy/EconomyManager.java +++ b/src/main/java/com/songoda/core/library/economy/EconomyManager.java @@ -33,6 +33,14 @@ public class EconomyManager { .findFirst().orElse(null); } + public static boolean isEnabled(String name) { + return getEconomy(name) != null; + } + + public static boolean isEnabled() { + return !registeredEconomies.isEmpty(); + } + public static Set getRegisteredEconomies() { return Collections.unmodifiableSet(registeredEconomies); }