Replace isPluginEnabled check with null check.

Fixes vault economy interactions.
This commit is contained in:
TheBlackEntity 2024-05-21 19:21:08 +02:00
parent 1590a4b6eb
commit 616aa0c338

View File

@ -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