mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-29 04:04:43 +02:00
Add NullEconHandler to avoid verbose null checks
This commit is contained in:

committed by
Alexander Söderberg

parent
a5dea9e7f6
commit
551d1d9f1a
@ -107,14 +107,14 @@ public class BukkitModule extends AbstractModule {
|
||||
install(new FactoryModuleBuilder().build(ChunkCoordinatorBuilderFactory.class));
|
||||
}
|
||||
|
||||
@Provides @Singleton @Nullable EconHandler provideEconHandler() {
|
||||
@Provides @Singleton @Nonnull EconHandler provideEconHandler() {
|
||||
if (Bukkit.getPluginManager().isPluginEnabled("Vault")) {
|
||||
try {
|
||||
return new BukkitEconHandler();
|
||||
} catch (final Exception ignored) {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return EconHandler.nullEconHandler();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user