1
0
mirror of https://github.com/GeyserMC/Floodgate.git synced 2025-12-19 14:59:20 +00:00

Velocity modern forwarding support doesn't exist pre-1.13

This commit is contained in:
Camotoy
2022-06-16 20:09:45 -04:00
parent a46f43d19a
commit 6e2c19f118

View File

@@ -216,7 +216,9 @@ public class ClassNames {
if (paperConfig != null) { if (paperConfig != null) {
Field velocitySupport = getField(paperConfig, "velocitySupport"); Field velocitySupport = getField(paperConfig, "velocitySupport");
PAPER_VELOCITY_SUPPORT = () -> castedStaticBooleanValue(velocitySupport); // velocitySupport field is null pre-1.13
PAPER_VELOCITY_SUPPORT = velocitySupport != null ?
() -> castedStaticBooleanValue(velocitySupport) : null;
} else { } else {
PAPER_VELOCITY_SUPPORT = null; PAPER_VELOCITY_SUPPORT = null;
} }