3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-26 00:00:33 +01:00

Fix load ordering issue with VV

Fixes #204
Dieser Commit ist enthalten in:
KennyTV 2020-05-09 09:49:26 +02:00
Ursprung 040558e01f
Commit e7ab178449
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
2 geänderte Dateien mit 5 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -12,12 +12,13 @@ package nl.matsv.viabackwards;
import net.md_5.bungee.api.plugin.Plugin; import net.md_5.bungee.api.plugin.Plugin;
import nl.matsv.viabackwards.api.ViaBackwardsPlatform; import nl.matsv.viabackwards.api.ViaBackwardsPlatform;
import us.myles.ViaVersion.api.Via;
public class BungeePlugin extends Plugin implements ViaBackwardsPlatform { public class BungeePlugin extends Plugin implements ViaBackwardsPlatform {
@Override @Override
public void onEnable() { public void onLoad() {
this.init(getDataFolder()); Via.getManager().addEnableListener(() -> this.init(getDataFolder()));
} }
// Why is this not a thing in Bungee? O_o // Why is this not a thing in Bungee? O_o

Datei anzeigen

@ -19,6 +19,7 @@ import com.velocitypowered.api.plugin.Plugin;
import com.velocitypowered.api.plugin.annotation.DataDirectory; import com.velocitypowered.api.plugin.annotation.DataDirectory;
import nl.matsv.viabackwards.api.ViaBackwardsPlatform; import nl.matsv.viabackwards.api.ViaBackwardsPlatform;
import nl.matsv.viabackwards.velocity.VersionInfo; import nl.matsv.viabackwards.velocity.VersionInfo;
import us.myles.ViaVersion.api.Via;
import us.myles.ViaVersion.sponge.util.LoggerWrapper; import us.myles.ViaVersion.sponge.util.LoggerWrapper;
import java.io.File; import java.io.File;
@ -44,8 +45,7 @@ public class VelocityPlugin implements ViaBackwardsPlatform {
public void onProxyStart(ProxyInitializeEvent e) { public void onProxyStart(ProxyInitializeEvent e) {
// Setup Logger // Setup Logger
this.logger = new LoggerWrapper(loggerSlf4j); this.logger = new LoggerWrapper(loggerSlf4j);
// Init! Via.getManager().addEnableListener(() -> this.init(configPath.resolve("config.yml").toFile()));
this.init(configPath.resolve("config.yml").toFile());
} }
@Override @Override