From fe75320d6d0440022f86ffdbfa0920eac9808f97 Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+DoctorMacc@users.noreply.github.com> Date: Mon, 27 Jul 2020 18:18:22 -0400 Subject: [PATCH] Add WORLD_IMMUTABLE flag to spectator mode (#1034) Prevents the client from trying to interact with blocks --- .../translators/java/world/JavaNotifyClientTranslator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaNotifyClientTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaNotifyClientTranslator.java index 3a958bdaeb5..8b23bb6db3a 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaNotifyClientTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaNotifyClientTranslator.java @@ -85,6 +85,7 @@ public void translate(ServerNotifyClientPacket packet, GeyserSession session) { playerFlags.add(AdventureSetting.MAY_FLY); playerFlags.add(AdventureSetting.NO_CLIP); playerFlags.add(AdventureSetting.FLYING); + playerFlags.add(AdventureSetting.WORLD_IMMUTABLE); gameMode = GameMode.CREATIVE; // spectator doesnt exist on bedrock }