Skip to content

Commit

Permalink
Fix exception on 1.20.6 with Spigot (#5820)
Browse files Browse the repository at this point in the history
How could I forget to update the md_5 magic letter

Fixes #5818
  • Loading branch information
JRoy authored Jun 2, 2024
1 parent 434e7a0 commit 3a6fdd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public final class ReflUtil {
public static final NMSVersion V1_18_R1 = NMSVersion.fromString("v1_18_R1");
public static final NMSVersion V1_19_R1 = NMSVersion.fromString("v1_19_R1");
public static final NMSVersion V1_19_R2 = NMSVersion.fromString("v1_19_R2");
public static final NMSVersion V1_20_R4 = NMSVersion.fromString("v1_20_R4");
private static final Map<String, Class<?>> classCache = new HashMap<>();
private static final Table<Class<?>, String, Method> methodCache = HashBasedTable.create();
private static final Table<Class<?>, MethodParams, Method> methodParamCache = HashBasedTable.create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ public ReflServerStateProvider() {
MethodHandle isRunning = null;

final String MDFIVEMAGICLETTER;
if (ReflUtil.getNmsVersionObject().isHigherThanOrEqualTo(ReflUtil.V1_19_R2)) {
if (ReflUtil.getNmsVersionObject().isHigherThanOrEqualTo(ReflUtil.V1_20_R4)) {
MDFIVEMAGICLETTER = "x";
} else if (ReflUtil.getNmsVersionObject().isHigherThanOrEqualTo(ReflUtil.V1_19_R2)) {
MDFIVEMAGICLETTER = "v";
} else if (ReflUtil.getNmsVersionObject().isHigherThanOrEqualTo(ReflUtil.V1_19_R1)) {
MDFIVEMAGICLETTER = "u";
Expand Down

0 comments on commit 3a6fdd9

Please sign in to comment.