diff options
Diffstat (limited to '')
-rw-r--r-- | src/ClientHandle.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 43a9bc33e..4c59b47ce 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -1641,6 +1641,12 @@ void cClientHandle::HandleSlotSelected(Int16 a_SlotNum) void cClientHandle::HandleSpectate(const cUUID & a_PlayerUUID) { + if (!m_Player->IsGameModeSpectator()) + { + Kick("Tried to use spectator mode when not in game mode spectator."); + return; + } + m_Player->GetWorld()->DoWithPlayerByUUID(a_PlayerUUID, [=](cPlayer & a_ToSpectate) { m_Player->TeleportToEntity(a_ToSpectate); |