mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-07 11:20:11 +01:00
Registered ViaVersion extension
This commit is contained in:
parent
cbfc2e9b3f
commit
710f8ec5bd
@ -27,6 +27,7 @@ import com.djrapitops.plan.system.database.DBSystem;
|
||||
import com.djrapitops.plan.system.info.server.ServerInfo;
|
||||
import com.djrapitops.plan.system.processing.Processing;
|
||||
import com.djrapitops.plan.system.settings.config.PlanConfig;
|
||||
import com.djrapitops.plugin.api.Check;
|
||||
import com.djrapitops.plugin.logging.L;
|
||||
import com.djrapitops.plugin.logging.console.PluginLogger;
|
||||
import com.djrapitops.plugin.logging.error.ErrorHandler;
|
||||
@ -82,6 +83,8 @@ public class ExtensionServiceImplementation implements ExtensionService {
|
||||
|
||||
public void register() {
|
||||
extensionRegister.registerBuiltInExtensions();
|
||||
if (Check.isBukkitAvailable()) extensionRegister.registerBukkitExtensions();
|
||||
if (Check.isBungeeAvailable()) extensionRegister.registerBungeeExtensions();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -144,8 +144,8 @@ public class PlanSystem implements SubSystem {
|
||||
taskSystem,
|
||||
hookHandler
|
||||
);
|
||||
extensionService.register();
|
||||
queryService.register();
|
||||
extensionService.register();
|
||||
enabled = true;
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@ dependencies {
|
||||
compile "com.djrapitops:Extension-Sponge-Economy:7.1.0-R0.3"
|
||||
compile "com.djrapitops:Extension-SuperbVote:0.5.4-R0.1"
|
||||
compile "com.djrapitops:Extension-Vault:1.7-R0.2"
|
||||
compile "com.djrapitops:Extension-ViaVersion:2.1.3-R0.3"
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
|
@ -60,6 +60,22 @@ public class ExtensionRegister {
|
||||
new VaultExtensionFactory().createExtension().ifPresent(extensionService::register);
|
||||
}
|
||||
|
||||
public void registerBukkitExtensions() {
|
||||
// No need to catch exceptions here,
|
||||
// registerBuiltInExtensions method will not be called unless Plan has enabled properly
|
||||
ExtensionService extensionService = ExtensionService.getInstance();
|
||||
|
||||
new ViaVersionBukkitExtensionFactory().createExtension().ifPresent(extensionService::register);
|
||||
}
|
||||
|
||||
public void registerBungeeExtensions() {
|
||||
// No need to catch exceptions here,
|
||||
// registerBuiltInExtensions method will not be called unless Plan has enabled properly
|
||||
ExtensionService extensionService = ExtensionService.getInstance();
|
||||
|
||||
new ViaVersionBungeeExtensionFactory().createExtension().ifPresent(extensionService::register);
|
||||
}
|
||||
|
||||
private void registerEssentialsExtension(ExtensionService extensionService) {
|
||||
EssentialsExtensionFactory essentials = new EssentialsExtensionFactory();
|
||||
essentials.createExtension()
|
||||
|
Loading…
Reference in New Issue
Block a user