Spectator-Teleport: Add MC version check (#1825)

Feature not supported by Minecraft 1.7, only 1.8+
This commit is contained in:
ORelio 2021-11-18 17:42:31 +01:00
parent 76a10c0cd8
commit 1d1bd69eb2

View file

@ -2059,6 +2059,9 @@ namespace MinecraftClient.Protocol.Handlers
}
public bool SendSpectate(Guid UUID)
{
// MC 1.8 or greater
if (protocolversion >= MC18Version)
{
try
{
@ -2071,5 +2074,7 @@ namespace MinecraftClient.Protocol.Handlers
catch (System.IO.IOException) { return false; }
catch (ObjectDisposedException) { return false; }
}
else { return false; }
}
}
}