java is evil; why does this fix referencing-LocalPlayer on server issues

This commit is contained in:
Talia-12 2023-06-15 01:45:32 +10:00
parent 99e8228610
commit 4e4d34a315

View file

@ -57,10 +57,14 @@ public record MsgSentinelStatusUpdateAck(@Nullable Sentinel update) implements I
} }
public static void handle(MsgSentinelStatusUpdateAck self) { public static void handle(MsgSentinelStatusUpdateAck self) {
Minecraft.getInstance().execute(() -> { //noinspection Convert2Lambda
var player = Minecraft.getInstance().player; Minecraft.getInstance().execute(new Runnable() {
if (player != null) { @Override
IXplatAbstractions.INSTANCE.setSentinel(player, self.update()); public void run() {
var player = Minecraft.getInstance().player;
if (player != null) {
IXplatAbstractions.INSTANCE.setSentinel(player, self.update());
}
} }
}); });
} }