aboutsummaryrefslogtreecommitdiff
path: root/spark-velocity4/src/main/java/me/lucko/spark/velocity/Velocity4SparkPlugin.java
diff options
context:
space:
mode:
Diffstat (limited to 'spark-velocity4/src/main/java/me/lucko/spark/velocity/Velocity4SparkPlugin.java')
-rw-r--r--spark-velocity4/src/main/java/me/lucko/spark/velocity/Velocity4SparkPlugin.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/spark-velocity4/src/main/java/me/lucko/spark/velocity/Velocity4SparkPlugin.java b/spark-velocity4/src/main/java/me/lucko/spark/velocity/Velocity4SparkPlugin.java
index 0c57689..b638246 100644
--- a/spark-velocity4/src/main/java/me/lucko/spark/velocity/Velocity4SparkPlugin.java
+++ b/spark-velocity4/src/main/java/me/lucko/spark/velocity/Velocity4SparkPlugin.java
@@ -34,11 +34,13 @@ import me.lucko.spark.common.SparkPlatform;
import me.lucko.spark.common.SparkPlugin;
import me.lucko.spark.common.monitor.ping.PlayerPingProvider;
import me.lucko.spark.common.platform.PlatformInfo;
-import me.lucko.spark.common.util.ClassSourceLookup;
+import me.lucko.spark.common.sampler.source.ClassSourceLookup;
+import me.lucko.spark.common.sampler.source.SourceMetadata;
import org.slf4j.Logger;
import java.nio.file.Path;
+import java.util.Collection;
import java.util.List;
import java.util.logging.Level;
import java.util.stream.Stream;
@@ -134,6 +136,16 @@ public class Velocity4SparkPlugin implements SparkPlugin, SimpleCommand {
}
@Override
+ public Collection<SourceMetadata> getKnownSources() {
+ return SourceMetadata.gather(
+ this.proxy.pluginManager().plugins(),
+ plugin -> plugin.description().id(),
+ plugin -> plugin.description().version(),
+ plugin -> String.join(", ", plugin.description().authors())
+ );
+ }
+
+ @Override
public PlayerPingProvider createPlayerPingProvider() {
return new Velocity4PlayerPingProvider(this.proxy);
}