aboutsummaryrefslogtreecommitdiff
path: root/spark-velocity/src/main/java/me/lucko/spark/velocity/VelocitySparkPlugin.java
diff options
context:
space:
mode:
authorembeddedt <42941056+embeddedt@users.noreply.github.com>2022-12-26 18:58:46 -0500
committerembeddedt <42941056+embeddedt@users.noreply.github.com>2022-12-26 18:58:46 -0500
commit1075665def4a41cf0064255a6da1d1a652f5d473 (patch)
tree11bba64e8f28ce8b83adc05252b75f17e2ccbf6a /spark-velocity/src/main/java/me/lucko/spark/velocity/VelocitySparkPlugin.java
parentd9550259c1995d21fc345c58f2e531fdecf75acd (diff)
parentd9655c40c02aef137c7a6a00a1cc90a1e6fb08d1 (diff)
downloadspark-1075665def4a41cf0064255a6da1d1a652f5d473.tar.gz
spark-1075665def4a41cf0064255a6da1d1a652f5d473.tar.bz2
spark-1075665def4a41cf0064255a6da1d1a652f5d473.zip
Merge remote-tracking branch 'lucko/master' into forge-1.7.10
Diffstat (limited to 'spark-velocity/src/main/java/me/lucko/spark/velocity/VelocitySparkPlugin.java')
-rw-r--r--spark-velocity/src/main/java/me/lucko/spark/velocity/VelocitySparkPlugin.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/spark-velocity/src/main/java/me/lucko/spark/velocity/VelocitySparkPlugin.java b/spark-velocity/src/main/java/me/lucko/spark/velocity/VelocitySparkPlugin.java
index 7d9ced8..4a89a4e 100644
--- a/spark-velocity/src/main/java/me/lucko/spark/velocity/VelocitySparkPlugin.java
+++ b/spark-velocity/src/main/java/me/lucko/spark/velocity/VelocitySparkPlugin.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 VelocitySparkPlugin implements SparkPlugin, SimpleCommand {
}
@Override
+ public Collection<SourceMetadata> getKnownSources() {
+ return SourceMetadata.gather(
+ this.proxy.getPluginManager().getPlugins(),
+ plugin -> plugin.getDescription().getId(),
+ plugin -> plugin.getDescription().getVersion().orElse("unspecified"),
+ plugin -> String.join(", ", plugin.getDescription().getAuthors())
+ );
+ }
+
+ @Override
public PlayerPingProvider createPlayerPingProvider() {
return new VelocityPlayerPingProvider(this.proxy);
}