If a version lookup failed, try to resolve the client version again

This commit is contained in:
DefineOutside committed 2021-09-15 23:37:04 -05:00
1 parent 1ac55ffd50
commit 934d5378e5
2 files changed
+3 -2

No files matched your search

@@ -275,7 +275,7 @@ public enum ClientVersion {
*
* @return Is resolved
*/
public boolean isResoled() {
public boolean isResolved() {
return this != TEMP_UNRESOLVED && this != UNRESOLVED;
}
}
@@ -151,7 +151,8 @@ public final class PlayerUtils {
return ClientVersion.UNKNOWN;
}
ClientVersion version = clientVersionsMap.get(player.getAddress());
if (version == null) {
// If a player's version didn't resolve, we should try and resolve it again
if (version == null || !version.isResolved()) {
//Prioritize asking ViaVersion and ProtocolSupport as they modify the protocol version in the packet we access it from.
if (VersionLookupUtils.isDependencyAvailable()) {
try {