Delay version detection when using legacy injector

This commit is contained in:
Nassim Jahnke 2023-03-10 14:29:28 +01:00
parent 7c9c602cec
commit 10737f17e2
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
2 changed files with 8 additions and 0 deletions

View File

@ -114,6 +114,9 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaPlatform<Player>
getServer().getPluginManager().registerEvent(serverInitEventClass, new Listener() {
}, EventPriority.HIGHEST, (listener, event) -> manager.onServerLoaded(), this);
} else if (Via.getManager().getInjector().lateProtocolVersionSetting()) {
// Enable after server has loaded at the next tick
runSync(manager::onServerLoaded);
} else {
manager.onServerLoaded();
}

View File

@ -153,6 +153,11 @@ public class BukkitViaInjector extends LegacyViaInjector {
}
}
@Override
public boolean lateProtocolVersionSetting() {
return !PaperViaInjector.PAPER_PROTOCOL_METHOD;
}
public boolean isBinded() {
if (PaperViaInjector.PAPER_INJECTION_METHOD) {
return true;