--- a/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java
+++ b/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java
@@ -29,7 +29,7 @@
         this.items = p_101861_.stream()
             .filter(p_253336_ -> p_253336_.getGameMode() != GameType.SPECTATOR)
             .sorted(PROFILE_ORDER)
-            .map(p_253334_ -> new PlayerMenuItem(p_253334_.getProfile()))
+            .map(p_253334_ -> (SpectatorMenuItem)new PlayerMenuItem(p_253334_.getProfile()))
             .toList();
     }
 
