Skip to content

Commit 3cf4209

Browse files
committed
Updated ViaProxy API usage
1 parent a77b87a commit 3cf4209

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[ViaProxy](https://github.com/RaphiMC/ViaProxy) plugin which implements the [spark](https://github.com/lucko/spark) profiler.
33

44
## Installation and Usage
5-
1. Download the latest version from [GitHub Actions](https://github.com/ViaVersionAddons/ViaProxySpark/actions/workflows/build.yml).
5+
1. Download the latest stable release from [GitHub Releases](https://github.com/ViaVersionAddons/ViaProxySpark/releases/latest) or the latest dev build from [GitHub Actions](https://github.com/ViaVersionAddons/ViaProxySpark/actions/workflows/build.yml).
66
2. Put the jar file into the plugins folder of ViaProxy
77
3. Run ViaProxy. You should now be able to run spark commands in the console.
88

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ repositories {
3636
}
3737

3838
dependencies {
39-
implementation "net.raphimc:ViaProxy:3.3.7"
39+
implementation "net.raphimc:ViaProxy:3.4.0"
4040

4141
include "me.lucko:spark-common:1.10.119-SNAPSHOT"
4242
}

src/main/java/net/raphimc/sparkplugin/ViaProxySparkPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*/
1818
package net.raphimc.sparkplugin;
1919

20+
import com.viaversion.vialoader.commands.UserCommandSender;
2021
import com.viaversion.viaversion.api.Via;
2122
import me.lucko.spark.common.SparkPlatform;
2223
import me.lucko.spark.common.SparkPlugin;
@@ -33,7 +34,6 @@
3334

3435
import java.io.File;
3536
import java.nio.file.Path;
36-
import java.util.Arrays;
3737
import java.util.logging.Level;
3838
import java.util.stream.Stream;
3939

@@ -74,7 +74,7 @@ public String getCommandName() {
7474

7575
@Override
7676
public Stream<ViaProxyCommandSender> getCommandSenders() {
77-
return Arrays.stream(Via.getPlatform().getOnlinePlayers()).map(ViaProxyCommandSender::new);
77+
return Via.getManager().getConnectionManager().getClientConnections().values().stream().map(UserCommandSender::new).map(ViaProxyCommandSender::new);
7878
}
7979

8080
@Override

src/main/resources/viaproxy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ name: "SparkPlugin"
22
version: "${version}"
33
author: "RK_01 and lucko"
44
main: "net.raphimc.sparkplugin.ViaProxySparkPlugin"
5-
min-version: "3.2.1"
5+
min-version: "3.4.0"

0 commit comments

Comments
 (0)