From b073b23832d22ab4e40b0ffebdf37742361b0a5d Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Wed, 31 Jul 2019 12:43:28 +0300 Subject: [PATCH] Registered NuVotifier Extension --- Plan/extensions/build.gradle | 1 + .../implementation/ExtensionRegister.java | 37 ++++++++++--------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/Plan/extensions/build.gradle b/Plan/extensions/build.gradle index ffccf30af..43a999e9a 100644 --- a/Plan/extensions/build.gradle +++ b/Plan/extensions/build.gradle @@ -14,6 +14,7 @@ dependencies { compile 'com.djrapitops:Extension-McMMO:2.1.44-R0.2' compile 'com.djrapitops:Extension-MinigamesLib:1.14.17-R0.2' compile 'com.djrapitops:Extension-Nucleus:1.9.2-R0.2' + compile 'com.djrapitops:Extension-nuVotifier:2.3.4-R0.1' compile 'com.djrapitops:Extension-ProtocolSupport:4.29-R0.1' compile 'com.djrapitops:Extension-RedProtect:7.5.6-R0.2' compile 'com.djrapitops:Extension-Sponge-Economy:7.1.0-R0.3' diff --git a/Plan/extensions/src/main/java/com/djrapitops/plan/extension/implementation/ExtensionRegister.java b/Plan/extensions/src/main/java/com/djrapitops/plan/extension/implementation/ExtensionRegister.java index 6c85501d6..fda3265cd 100644 --- a/Plan/extensions/src/main/java/com/djrapitops/plan/extension/implementation/ExtensionRegister.java +++ b/Plan/extensions/src/main/java/com/djrapitops/plan/extension/implementation/ExtensionRegister.java @@ -22,6 +22,7 @@ import com.djrapitops.plan.extension.ExtensionService; import javax.inject.Inject; import javax.inject.Singleton; +import java.util.function.Consumer; /** * In charge of registering built in {@link com.djrapitops.plan.extension.DataExtension} implementations. @@ -41,25 +42,27 @@ public class ExtensionRegister { // registerBuiltInExtensions method will not be called unless Plan has enabled properly ExtensionService extensionService = ExtensionService.getInstance(); - new AACExtensionFactory().createExtension().ifPresent(extensionService::register); - new AdvancedAchievementsExtensionFactory().createExtension().ifPresent(extensionService::register); - new AdvancedBanExtensionFactory().createExtension().ifPresent(extensionService::register); - new ASkyBlockExtensionFactory().createExtension().ifPresent(extensionService::register); - new BanManagerExtensionFactory().createExtension().ifPresent(extensionService::register); - new CoreProtectExtensionFactory().createExtension().ifPresent(extensionService::register); - new DiscordSRVExtensionFactory().createExtension().ifPresent(extensionService::register); + Consumer register = extensionService::register; + new AACExtensionFactory().createExtension().ifPresent(register); + new AdvancedAchievementsExtensionFactory().createExtension().ifPresent(register); + new AdvancedBanExtensionFactory().createExtension().ifPresent(register); + new ASkyBlockExtensionFactory().createExtension().ifPresent(register); + new BanManagerExtensionFactory().createExtension().ifPresent(register); + new CoreProtectExtensionFactory().createExtension().ifPresent(register); + new DiscordSRVExtensionFactory().createExtension().ifPresent(register); registerEssentialsExtension(extensionService); - new GriefPreventionExtensionFactory().createExtension().ifPresent(extensionService::register); - new GriefPreventionSpongeExtensionFactory().createExtension().ifPresent(extensionService::register); - new GriefPreventionPlusExtensionFactory().createExtension().ifPresent(extensionService::register); - new McMMOExtensionFactory().createExtension().ifPresent(extensionService::register); + new GriefPreventionExtensionFactory().createExtension().ifPresent(register); + new GriefPreventionSpongeExtensionFactory().createExtension().ifPresent(register); + new GriefPreventionPlusExtensionFactory().createExtension().ifPresent(register); + new McMMOExtensionFactory().createExtension().ifPresent(register); registerMinigameLibExtensions(extensionService); - new NucleusExtensionFactory().createExtension().ifPresent(extensionService::register); - new ProtocolSupportExtensionFactory().createExtension().ifPresent(extensionService::register); - new RedProtectExtensionFactory().createExtension().ifPresent(extensionService::register); - new SpongeEconomyExtensionFactory().createExtension().ifPresent(extensionService::register); - new SuperbVoteExtensionFactory().createExtension().ifPresent(extensionService::register); - new VaultExtensionFactory().createExtension().ifPresent(extensionService::register); + new NucleusExtensionFactory().createExtension().ifPresent(register); + new NuVotifierExtensionFactory().createExtension().ifPresent(register); + new ProtocolSupportExtensionFactory().createExtension().ifPresent(register); + new RedProtectExtensionFactory().createExtension().ifPresent(register); + new SpongeEconomyExtensionFactory().createExtension().ifPresent(register); + new SuperbVoteExtensionFactory().createExtension().ifPresent(register); + new VaultExtensionFactory().createExtension().ifPresent(register); } public void registerBukkitExtensions() {