Source:
public void onEnable() { pluginName = this.getDescription().getName(); pluginVersion = this.getDescription().getVersion(); Plugin drip = this.getServer().getPluginManager().getPlugin("DripReporter"); if (drip != null && drip.isEnabled()) { monitor = (DripReporterApi) drip; monitoring = true; Gauge<Integer> recordingQ = RecordingQueue::getQueueSize; monitor.addGauge(Prism.class, recordingQ, "RecordingQueueSize"); ActionMeter.setupActionMeter(monitor.getRegistry()); } log("Initializing Prism " + pluginVersion + ". Originally by Viveleroi; maintained by the AddstarMC Network"); PaperLib.suggestPaper(this); loadConfig(); if (getConfig().getBoolean("prism.allow-metrics")) { Prism.log("Prism bStats metrics are enabled - thank you!"); int pluginid = 4365; Metrics metrics = new Metrics(this, pluginid); if (!metrics.isEnabled()) { Prism.warn("bStats failed to initialise! Please check Prism/bStats configs."); } } if (getConfig().getBoolean("prism.paste.enable")) { pasteKey = Prism.config.getString("prism.paste.api-key", "API KEY"); if (pasteKey != null && pasteKey.startsWith("API key") || pasteKey.length() < 6) { pasteKey = null; } } else { pasteKey = null; } Bukkit.getScheduler().runTaskAsynchronously(instance, () -> { prismDataSource = PrismDatabaseFactory.createDataSource(config); Connection testConnection; if (prismDataSource != null) { testConnection = prismDataSource.getConnection(); if (testConnection != null) { try { testConnection.close(); } catch (final SQLException e) { prismDataSource.handleDataSourceException(e); } } } else { notifyDisabled(); Bukkit.getScheduler().runTask(instance, () -> instance.onDisable()); return; } if (testConnection == null) { notifyDisabled(); Bukkit.getScheduler().runTask(instance, () -> instance.onDisable()); return; } Bukkit.getScheduler().runTask(instance, () -> instance.enabled()); }); }

Target:
public void onEnable() { pluginName = this.getDescription().getName(); pluginVersion = this.getDescription().getVersion(); log("Initializing Prism " + pluginVersion + ". Originally by Viveleroi; maintained by the AddstarMC Network"); Plugin drip = this.getServer().getPluginManager().getPlugin("DripReporter"); if (drip != null && drip.isEnabled()) { monitor = (DripReporterApi) drip; monitoring = true; Gauge<Integer> recordingQ = RecordingQueue::getQueueSize; monitor.addGauge(Prism.class, recordingQ, "RecordingQueueSize"); ActionMeter.setupActionMeter(); log("Prism hooked DripReporterApi instance: " + drip.getName() + " " + drip.getDescription().getVersion()); } PaperLib.suggestPaper(this); loadConfig(); if (getConfig().getBoolean("prism.allow-metrics")) { Prism.log("Prism bStats metrics are enabled - thank you!"); int pluginid = 4365; Metrics metrics = new Metrics(this, pluginid); if (!metrics.isEnabled()) { Prism.warn("bStats failed to initialise! Please check Prism/bStats configs."); } } if (getConfig().getBoolean("prism.paste.enable")) { pasteKey = Prism.config.getString("prism.paste.api-key", "API KEY"); if (pasteKey != null && pasteKey.startsWith("API key") || pasteKey.length() < 6) { pasteKey = null; } } else { pasteKey = null; } Bukkit.getScheduler().runTaskAsynchronously(instance, () -> { prismDataSource = PrismDatabaseFactory.createDataSource(config); Connection testConnection; if (prismDataSource != null) { testConnection = prismDataSource.getConnection(); if (testConnection != null) { try { testConnection.close(); } catch (final SQLException e) { prismDataSource.handleDataSourceException(e); } } } else { notifyDisabled(); Bukkit.getScheduler().runTask(instance, () -> instance.onDisable()); return; } if (testConnection == null) { notifyDisabled(); Bukkit.getScheduler().runTask(instance, () -> instance.onDisable()); return; } Bukkit.getScheduler().runTask(instance, () -> instance.enabled()); }); }