From 4e8ded512be08d09fec6b6d2b172c73bab6d4b5b Mon Sep 17 00:00:00 2001 From: Moulberry Date: Tue, 11 Feb 2025 17:15:22 +0800 Subject: [PATCH] Add Spectate button to Player List window --- .../flashback/editor/ui/windows/PlayerListWindow.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/moulberry/flashback/editor/ui/windows/PlayerListWindow.java b/src/main/java/com/moulberry/flashback/editor/ui/windows/PlayerListWindow.java index 04e3961..8e71a5a 100644 --- a/src/main/java/com/moulberry/flashback/editor/ui/windows/PlayerListWindow.java +++ b/src/main/java/com/moulberry/flashback/editor/ui/windows/PlayerListWindow.java @@ -138,7 +138,7 @@ public class PlayerListWindow { ImGui.text(profile.getName()); ImGui.sameLine(); - if (ImGui.smallButton("Teleport")) { + if (ImGui.smallButton("TP")) { Minecraft.getInstance().getConnection().sendUnsignedCommand("teleport " + profile.getId()); lastUpdate = currentTime; } @@ -154,6 +154,11 @@ public class PlayerListWindow { lastUpdate = currentTime; } } + ImGui.sameLine(); + if (ImGui.smallButton("Spectate")) { + Minecraft.getInstance().getConnection().sendUnsignedCommand("spectate " + profile.getId()); + lastUpdate = currentTime; + } ImGui.popID(); }