Updated to ViaVersion 5

This commit is contained in:
RaphiMC 2024-05-17 17:31:33 +02:00
parent 64d0ad1a14
commit d2b45fd415
No known key found for this signature in database
GPG Key ID: 0F6BB0657A03AC94
7 changed files with 15 additions and 20 deletions

View File

@ -5,7 +5,7 @@ plugins {
}
base {
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
compileJava.options.encoding = compileTestJava.options.encoding = javadoc.options.encoding = "UTF-8"
group = project.maven_group ?: rootProject.maven_group
@ -38,12 +38,12 @@ repositories {
}
dependencies {
compileOnly "com.viaversion:viaversion-common:4.10.2"
compileOnly "com.viaversion:viabackwards-common:4.10.2"
compileOnly "com.viaversion:viarewind-common:3.1.2"
compileOnly "net.raphimc:ViaLegacy:2.2.22"
compileOnly "net.raphimc:ViaAprilFools:2.0.12"
compileOnly "net.raphimc:ViaBedrock:0.0.7-SNAPSHOT"
compileOnly "com.viaversion:viaversion-common:5.0.0-SNAPSHOT"
compileOnly "com.viaversion:viabackwards-common:5.0.0-SNAPSHOT"
compileOnly "com.viaversion:viarewind-common:4.0.0-SNAPSHOT"
compileOnly "net.raphimc:ViaLegacy:3.0.0-SNAPSHOT"
compileOnly "net.raphimc:ViaAprilFools:3.0.0-SNAPSHOT"
compileOnly "net.raphimc:ViaBedrock:0.0.8-SNAPSHOT"
compileOnly "org.cloudburstmc.netty:netty-transport-raknet:1.0.0.CR3-SNAPSHOT"
api "com.google.guava:guava:33.2.0-jre"
@ -61,7 +61,6 @@ sourceSets {
java {
withSourcesJar()
withJavadocJar()
}
jar {

View File

@ -4,4 +4,4 @@ org.gradle.configureondemand=true
maven_group=net.raphimc
maven_name=ViaLoader
maven_version=2.2.14-SNAPSHOT
maven_version=3.0.0-SNAPSHOT

View File

@ -24,7 +24,7 @@ import com.viaversion.viaversion.api.connection.UserConnection;
import java.util.Set;
public class ConnectionsSubCommand extends ViaSubCommand {
public class ConnectionsSubCommand implements ViaSubCommand {
@Override
public String name() {

View File

@ -25,7 +25,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
public class LeakDetectSubCommand extends ViaSubCommand {
public class LeakDetectSubCommand implements ViaSubCommand {
@Override
public String name() {
@ -61,7 +61,7 @@ public class LeakDetectSubCommand extends ViaSubCommand {
.filter(it -> it.startsWith(args[0]))
.collect(Collectors.toList());
}
return super.onTabComplete(sender, args);
return ViaSubCommand.super.onTabComplete(sender, args);
}
}

View File

@ -157,7 +157,7 @@ public class ViaVersionPlatformImpl implements ViaPlatform<UserConnection> {
}
protected AbstractViaConfig createConfig() {
return new VLViaConfig(new File(this.dataFolder, "viaversion.yml"));
return new VLViaConfig(new File(this.dataFolder, "viaversion.yml"), this.getLogger());
}
protected ViaAPI<UserConnection> createApi() {

View File

@ -25,6 +25,7 @@ import java.io.File;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
public class VLViaConfig extends AbstractViaConfig {
@ -37,8 +38,8 @@ public class VLViaConfig extends AbstractViaConfig {
"use-new-deathmessages", "nms-player-ticking"
);
public VLViaConfig(final File configFile) {
super(configFile);
public VLViaConfig(final File configFile, final Logger logger) {
super(configFile, logger);
}
@Override

View File

@ -29,11 +29,6 @@ public class VLTask implements PlatformTask<Task> {
this.task = task;
}
@Override
public Task getObject() {
return this.task;
}
@Override
public void cancel() {
this.task.cancel();