From 616aa0c33805723694748298e6740632dc5ed02e Mon Sep 17 00:00:00 2001 From: TheBlackEntity <36412486+TheBlackEntity@users.noreply.github.com> Date: Tue, 21 May 2024 19:21:08 +0200 Subject: [PATCH] Replace `isPluginEnabled` check with null check. Fixes vault economy interactions. --- .../main/java/com/plotsquared/bukkit/inject/BukkitModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/inject/BukkitModule.java b/Bukkit/src/main/java/com/plotsquared/bukkit/inject/BukkitModule.java index fba7790f0..a33295b33 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/inject/BukkitModule.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/inject/BukkitModule.java @@ -133,7 +133,7 @@ public class BukkitModule extends AbstractModule { @Provides @Singleton @NonNull EconHandler provideEconHandler() { - if (!Settings.Enabled_Components.ECONOMY || !Bukkit.getPluginManager().isPluginEnabled("Vault")) { + if (!Settings.Enabled_Components.ECONOMY || Bukkit.getPluginManager().getPlugin("Vault") == null) { return EconHandler.nullEconHandler(); } // Guice eagerly initializes singletons, so we need to bring the laziness ourselves