mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-21 16:47:57 +01:00
parent
08f6c0b1f1
commit
3d3c1a0430
@ -22,6 +22,7 @@ import com.viaversion.viabackwards.api.ViaBackwardsPlatform;
|
||||
import com.viaversion.viabackwards.listener.FireDamageListener;
|
||||
import com.viaversion.viabackwards.listener.FireExtinguishListener;
|
||||
import com.viaversion.viabackwards.listener.LecternInteractListener;
|
||||
import com.viaversion.viaversion.ViaVersionPlugin;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import com.viaversion.viaversion.bukkit.platform.BukkitViaLoader;
|
||||
@ -29,8 +30,21 @@ import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class BukkitPlugin extends JavaPlugin implements ViaBackwardsPlatform {
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
if (!ViaVersionPlugin.getInstance().isLateBind()) {
|
||||
init();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
if (ViaVersionPlugin.getInstance().isLateBind()) {
|
||||
init();
|
||||
}
|
||||
}
|
||||
|
||||
private void init() {
|
||||
init(getDataFolder());
|
||||
Via.getPlatform().runSync(this::onServerLoaded);
|
||||
}
|
||||
|
@ -7,5 +7,4 @@ api-version: 1.13
|
||||
authors: [Matsv, KennyTV, Gerrygames, creeper123123321, ForceUpdate1]
|
||||
website: ${url}
|
||||
|
||||
load: STARTUP
|
||||
depend: [ViaVersion]
|
||||
|
@ -73,7 +73,6 @@ public interface ViaBackwardsPlatform {
|
||||
getLogger().info("Loading translations...");
|
||||
TranslatableRewriter.loadTranslatables();
|
||||
|
||||
getLogger().info("Registering protocols...");
|
||||
ProtocolManager protocolManager = Via.getManager().getProtocolManager();
|
||||
protocolManager.registerProtocol(new Protocol1_9_4To1_10(), ProtocolVersion.v1_9_3, ProtocolVersion.v1_10);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user