mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-25 12:45:35 +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
|
@Override
|
||||||
public void onEnable() {
|
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();
|
BukkitViaLoader loader = (BukkitViaLoader) Via.getManager().getLoader();
|
||||||
int protocolVersion = Via.getAPI().getServerVersion().highestSupportedVersion();
|
int protocolVersion = Via.getAPI().getServerVersion().highestSupportedVersion();
|
||||||
if (protocolVersion >= ProtocolVersion.v1_17.getVersion()) {
|
if (protocolVersion >= ProtocolVersion.v1_17.getVersion()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user