Registered MinigamesLib Extension

This commit is contained in:
Rsl1122 2019-04-01 17:47:52 +03:00
parent bdcf7c9dc0
commit d9bf729f40
2 changed files with 8 additions and 0 deletions

View File

@ -6,6 +6,7 @@ dependencies {
compile "com.djrapitops:Extension-CoreProtect:6-R0.1"
compile "com.djrapitops:Extension-DiscordSRV:1.16.6-R0.2"
compile "com.djrapitops:Extension-EssentialsX:2.15.0-R0.3"
compile 'com.djrapitops:Extension-MinigamesLib:1.14.17-R0.1'
compile "com.djrapitops:Extension-Sponge-Economy:7.1.0-R0.2"
}

View File

@ -17,6 +17,7 @@
package com.djrapitops.plan.extension.implementation;
import com.djrapitops.extension.*;
import com.djrapitops.plan.extension.DataExtension;
import com.djrapitops.plan.extension.ExtensionService;
import javax.inject.Inject;
@ -46,10 +47,16 @@ public class ExtensionRegister {
new BanManagerExtensionFactory().createExtension().ifPresent(extensionService::register);
new CoreProtectExtensionFactory().createExtension().ifPresent(extensionService::register);
new DiscordSRVExtensionFactory().createExtension().ifPresent(extensionService::register);
EssentialsExtensionFactory essentials = new EssentialsExtensionFactory();
essentials.createExtension()
.map(extensionService::register).flatMap(Function.identity()) // If the extension was registered this is present.
.ifPresent(essentials::registerUpdateListeners);
for (DataExtension minigame : new MinigameLibExtensionFactory().createExtensions()) {
extensionService.register(minigame);
}
new SpongeEconomyExtensionFactory().createExtension().ifPresent(extensionService::register);
}