+ /** The event bus. */
+ private EventBus eventBus;
+
+ /** The web interface. */
+ private WebInterface webInterface;
+
+ /** The FCP interface. */
+ private FcpInterface fcpInterface;
+
+ /** The l10n helper. */
+ private PluginL10n l10n;
+
+ /** The web of trust connector. */
+ private WebOfTrustConnector webOfTrustConnector;
+
+ public SonePlugin() {
+ this(Guice::createInjector);
+ }
+
+ @VisibleForTesting
+ public SonePlugin(Function1<Module[], Injector> injectorCreator) {
+ this.injectorCreator = injectorCreator;
+ }
+
+ //
+ // ACCESSORS
+ //
+
+ /**
+ * Returns the plugin respirator for this plugin.
+ *
+ * @return The plugin respirator
+ */
+ public PluginRespirator pluginRespirator() {
+ return pluginRespirator;
+ }
+
+ /**
+ * Returns the core started by this plugin.
+ *
+ * @return The core
+ */
+ public Core core() {
+ return core;
+ }
+
+ /**
+ * Returns the plugin’s l10n helper.
+ *
+ * @return The plugin’s l10n helper
+ */
+ public PluginL10n l10n() {
+ return l10n;
+ }
+
+ public static String getPluginVersion() {
+ net.pterodactylus.sone.main.Version version = VersionParserKt.getParsedVersion();
+ return (version == null) ? "unknown" : version.getNice();
+ }
+
+ public int getYear() {
+ return YEAR;
+ }
+
+ public String getHomepage() {
+ return SONE_HOMEPAGE + LATEST_EDITION;
+ }
+
+ public static long getLatestEdition() {
+ return LATEST_EDITION;
+ }
+