mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-22 12:16:21 +01:00
Delay version detection when using legacy injector
This commit is contained in:
parent
4293289468
commit
fc565f8cd5
@ -36,6 +36,15 @@ public class BukkitPlugin extends JavaPlugin implements ViaBackwardsPlatform {
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
if (Via.getManager().getInjector().lateProtocolVersionSetting()) {
|
||||
// Enable in the next tick
|
||||
Via.getPlatform().runSync(this::enable);
|
||||
} else {
|
||||
enable();
|
||||
}
|
||||
}
|
||||
|
||||
private void enable() {
|
||||
BukkitViaLoader loader = (BukkitViaLoader) Via.getManager().getLoader();
|
||||
int protocolVersion = Via.getAPI().getServerVersion().highestSupportedVersion();
|
||||
if (protocolVersion >= ProtocolVersion.v1_17.getVersion()) {
|
||||
|
Loading…
Reference in New Issue
Block a user