Skip to content

Commit

Permalink
ViaVersion 4.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianMichael committed Nov 18, 2023
1 parent a4f6ee4 commit 45b7a29
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 78 deletions.
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

archivesBaseName = "ViaLoadingBase"
version = "4.5.0"
version = "4.6.0"
group = "de.florianmichael"

repositories {
Expand Down Expand Up @@ -33,11 +33,11 @@ java {

dependencies {
// Via Version
compileOnly("com.viaversion:viaversion:4.7.0-23w17a-SNAPSHOT")
compileOnly("com.viaversion:viabackwards-common:4.7.0-23w17a-SNAPSHOT")
compileOnly("com.viaversion:viarewind-core:2.0.4-SNAPSHOT")
compileOnly("com.viaversion:viaversion-common:4.9.0-23w45a-SNAPSHOT")
compileOnly("com.viaversion:viabackwards-common:4.9.0-23w45a-SNAPSHOT")
compileOnly("com.viaversion:viarewind-common:3.0.4-SNAPSHOT")

compileOnly("org.yaml:snakeyaml:2.0")
compileOnly("org.yaml:snakeyaml:2.2")
compileOnly("com.google.guava:guava:31.1-jre")
compileOnly("io.netty:netty-all:5.0.0.Alpha2")
compileOnly("org.apache.logging.log4j:log4j-core:2.19.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class ViaLoadingBase {
// Empty
}, protocolVersions -> protocolVersions.addAll(ViaVersionPlatformImpl.createVersionList()));
public final static Platform PLATFORM_VIA_BACKWARDS = new Platform("ViaBackwards", () -> inClassPath("com.viaversion.viabackwards.api.ViaBackwardsPlatform"), () -> new ViaBackwardsPlatformImpl(Via.getManager().getPlatform().getDataFolder()));
public final static Platform PLATFORM_VIA_REWIND = new Platform("ViaRewind", () -> inClassPath("de.gerrygames.viarewind.api.ViaRewindPlatform"), () -> new ViaRewindPlatformImpl(Via.getManager().getPlatform().getDataFolder()));
public final static Platform PLATFORM_VIA_REWIND = new Platform("ViaRewind", () -> inClassPath("com.viaversion.viarewind.api.ViaRewindPlatform"), () -> new ViaRewindPlatformImpl(Via.getManager().getPlatform().getDataFolder()));

public final static Map<ProtocolVersion, ComparableProtocolVersion> PROTOCOLS = new LinkedHashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class ViaBackwardsPlatformImpl implements ViaBackwardsPlatform {
private final File directory;

public ViaBackwardsPlatformImpl(final File directory) {
this.init(this.directory = directory);
this.init(new File(this.directory = directory, "viabackwards.yml"));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,16 @@
*/
package de.florianmichael.vialoadingbase.platform;

import com.viaversion.viarewind.api.ViaRewindPlatform;
import de.florianmichael.vialoadingbase.ViaLoadingBase;
import de.gerrygames.viarewind.api.ViaRewindConfigImpl;
import de.gerrygames.viarewind.api.ViaRewindPlatform;

import java.io.File;
import java.util.logging.Logger;

public class ViaRewindPlatformImpl implements ViaRewindPlatform {

public ViaRewindPlatformImpl(final File directory) {
final ViaRewindConfigImpl config = new ViaRewindConfigImpl(new File(directory, "viarewind.yml"));
config.reloadConfig();
this.init(config);
this.init(new File(directory, "viarewind.yml"));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,10 @@ public boolean isPluginEnabled() {
return true;
}

@Override
public ConfigurationProvider getConfigurationProvider() {
public VLBViaConfig getConfig() {
return config;
}

@Override
public boolean isOldClientsAllowed() {
return true;
}

@Override
public Collection<UnsupportedSoftware> getUnsupportedSoftwareClasses() {
return ViaPlatform.super.getUnsupportedSoftwareClasses();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
import com.viaversion.viaversion.api.platform.ViaPlatformLoader;
import com.viaversion.viaversion.api.platform.providers.ViaProviders;
import com.viaversion.viaversion.api.protocol.version.VersionProvider;
import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider;
import de.florianmichael.vialoadingbase.ViaLoadingBase;
import de.florianmichael.vialoadingbase.platform.providers.VLBMovementTransmitterProvider;
import de.florianmichael.vialoadingbase.provider.VLBBaseVersionProvider;

public class VLBViaProviders implements ViaPlatformLoader {
Expand All @@ -33,7 +31,6 @@ public void load() {
// Now, we can implement custom providers
final ViaProviders providers = Via.getManager().getProviders();
providers.use(VersionProvider.class, new VLBBaseVersionProvider());
providers.use(MovementTransmitterProvider.class, new VLBMovementTransmitterProvider());

if (ViaLoadingBase.getInstance().getProviders() != null) ViaLoadingBase.getInstance().getProviders().accept(providers);
}
Expand Down

0 comments on commit 45b7a29

Please sign in to comment.