Skip to content

Commit

Permalink
XSkull - Proxy for 1.18.1-1.19.4
Browse files Browse the repository at this point in the history
Fixed the proxy getter for v1.18.1-1.19.4 servers (Fixes #282)
  • Loading branch information
CryptoMorin committed Jul 10, 2024
1 parent 751e484 commit 7727233
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/com/cryptomorin/xseries/profiles/ProfilesCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ public final class ProfilesCore {
cacheProfile = GameProfileCache.method("public void add(GameProfile profile);")
.map(MinecraftMapping.OBFUSCATED, "a").reflect();

// Some versions don't have the public getProxy() method. It's very inconsistent...
// Some versions don't have the public getProxy() method. It's very very inconsistent...
proxy = (Proxy) MinecraftServer.field("protected final java.net.Proxy proxy;").getter()
.map(MinecraftMapping.OBFUSCATED, v(20, 5, "h")
.v(20, 3, "i")
.v(20, 1, "j")
.map(MinecraftMapping.OBFUSCATED, v(20, 5, "h").v(20, 3, "i")
.v(19, "j")
.v(18, 2, "n").v(18, "o")
.v(17, "m")
.v(14, "proxy") // v1.14 -> v1.16
.v(13, "c").orElse(/* v1.8 and v1.9 */ "e"))
.unreflect().invoke(minecraftServer);
.reflect().invoke(minecraftServer);
} catch (Throwable throwable) {
throw XReflection.throwCheckedException(throwable);
}
Expand Down

0 comments on commit 7727233

Please sign in to comment.