mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-20 16:37:48 +01:00
parent
040558e01f
commit
e7ab178449
@ -12,12 +12,13 @@ package nl.matsv.viabackwards;
|
||||
|
||||
import net.md_5.bungee.api.plugin.Plugin;
|
||||
import nl.matsv.viabackwards.api.ViaBackwardsPlatform;
|
||||
import us.myles.ViaVersion.api.Via;
|
||||
|
||||
public class BungeePlugin extends Plugin implements ViaBackwardsPlatform {
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
this.init(getDataFolder());
|
||||
public void onLoad() {
|
||||
Via.getManager().addEnableListener(() -> this.init(getDataFolder()));
|
||||
}
|
||||
|
||||
// Why is this not a thing in Bungee? O_o
|
||||
|
@ -19,6 +19,7 @@ import com.velocitypowered.api.plugin.Plugin;
|
||||
import com.velocitypowered.api.plugin.annotation.DataDirectory;
|
||||
import nl.matsv.viabackwards.api.ViaBackwardsPlatform;
|
||||
import nl.matsv.viabackwards.velocity.VersionInfo;
|
||||
import us.myles.ViaVersion.api.Via;
|
||||
import us.myles.ViaVersion.sponge.util.LoggerWrapper;
|
||||
|
||||
import java.io.File;
|
||||
@ -44,8 +45,7 @@ public class VelocityPlugin implements ViaBackwardsPlatform {
|
||||
public void onProxyStart(ProxyInitializeEvent e) {
|
||||
// Setup Logger
|
||||
this.logger = new LoggerWrapper(loggerSlf4j);
|
||||
// Init!
|
||||
this.init(configPath.resolve("config.yml").toFile());
|
||||
Via.getManager().addEnableListener(() -> this.init(configPath.resolve("config.yml").toFile()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user