aboutsummaryrefslogtreecommitdiff
path: root/spark-waterdog
diff options
context:
space:
mode:
authorlucko <git@lucko.me>2022-12-27 09:17:54 +0000
committerGitHub <noreply@github.com>2022-12-27 09:17:54 +0000
commite5b278047ccb7bc6b301d787474c51d162911867 (patch)
tree11bba64e8f28ce8b83adc05252b75f17e2ccbf6a /spark-waterdog
parent4a16a1a2f4eb09f706b4a541e3d31618de29420b (diff)
parent1075665def4a41cf0064255a6da1d1a652f5d473 (diff)
downloadspark-e5b278047ccb7bc6b301d787474c51d162911867.tar.gz
spark-e5b278047ccb7bc6b301d787474c51d162911867.tar.bz2
spark-e5b278047ccb7bc6b301d787474c51d162911867.zip
Merge pull request #284 from embeddedt/forge-1.7.10
Align 1.7.10 with master
Diffstat (limited to 'spark-waterdog')
-rw-r--r--spark-waterdog/build.gradle5
-rw-r--r--spark-waterdog/src/main/java/me/lucko/spark/waterdog/WaterdogClassSourceLookup.java2
-rw-r--r--spark-waterdog/src/main/java/me/lucko/spark/waterdog/WaterdogSparkPlugin.java14
3 files changed, 15 insertions, 6 deletions
diff --git a/spark-waterdog/build.gradle b/spark-waterdog/build.gradle
index c11e3fb..9c1a4d3 100644
--- a/spark-waterdog/build.gradle
+++ b/spark-waterdog/build.gradle
@@ -9,7 +9,7 @@ tasks.withType(JavaCompile) {
dependencies {
implementation project(':spark-common')
- implementation 'net.kyori:adventure-text-serializer-legacy:4.4.0'
+ implementation 'net.kyori:adventure-text-serializer-legacy:4.12.0'
compileOnly 'dev.waterdog.waterdogpe:waterdog:1.1.3-SNAPSHOT'
}
@@ -30,11 +30,8 @@ processResources {
shadowJar {
archiveName = "spark-${project.pluginVersion}-waterdog.jar"
- relocate 'okio', 'me.lucko.spark.lib.okio'
- relocate 'okhttp3', 'me.lucko.spark.lib.okhttp3'
relocate 'net.kyori.adventure', 'me.lucko.spark.lib.adventure'
relocate 'net.kyori.examination', 'me.lucko.spark.lib.adventure.examination'
- relocate 'org.tukaani.xz', 'me.lucko.spark.lib.xz'
relocate 'net.bytebuddy', 'me.lucko.spark.lib.bytebuddy'
relocate 'com.google.protobuf', 'me.lucko.spark.lib.protobuf'
relocate 'org.objectweb.asm', 'me.lucko.spark.lib.asm'
diff --git a/spark-waterdog/src/main/java/me/lucko/spark/waterdog/WaterdogClassSourceLookup.java b/spark-waterdog/src/main/java/me/lucko/spark/waterdog/WaterdogClassSourceLookup.java
index 36e6a57..2207c9e 100644
--- a/spark-waterdog/src/main/java/me/lucko/spark/waterdog/WaterdogClassSourceLookup.java
+++ b/spark-waterdog/src/main/java/me/lucko/spark/waterdog/WaterdogClassSourceLookup.java
@@ -20,7 +20,7 @@
package me.lucko.spark.waterdog;
-import me.lucko.spark.common.util.ClassSourceLookup;
+import me.lucko.spark.common.sampler.source.ClassSourceLookup;
import dev.waterdog.waterdogpe.ProxyServer;
import dev.waterdog.waterdogpe.plugin.Plugin;
diff --git a/spark-waterdog/src/main/java/me/lucko/spark/waterdog/WaterdogSparkPlugin.java b/spark-waterdog/src/main/java/me/lucko/spark/waterdog/WaterdogSparkPlugin.java
index 07b153a..1a64a98 100644
--- a/spark-waterdog/src/main/java/me/lucko/spark/waterdog/WaterdogSparkPlugin.java
+++ b/spark-waterdog/src/main/java/me/lucko/spark/waterdog/WaterdogSparkPlugin.java
@@ -24,7 +24,8 @@ 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 dev.waterdog.waterdogpe.ProxyServer;
import dev.waterdog.waterdogpe.command.Command;
@@ -32,6 +33,7 @@ import dev.waterdog.waterdogpe.command.CommandSender;
import dev.waterdog.waterdogpe.plugin.Plugin;
import java.nio.file.Path;
+import java.util.Collection;
import java.util.logging.Level;
import java.util.stream.Stream;
@@ -101,6 +103,16 @@ public class WaterdogSparkPlugin extends Plugin implements SparkPlugin {
}
@Override
+ public Collection<SourceMetadata> getKnownSources() {
+ return SourceMetadata.gather(
+ getProxy().getPluginManager().getPlugins(),
+ Plugin::getName,
+ plugin -> plugin.getDescription().getVersion(),
+ plugin -> plugin.getDescription().getAuthor()
+ );
+ }
+
+ @Override
public PlayerPingProvider createPlayerPingProvider() {
return new WaterdogPlayerPingProvider(getProxy());
}