videogamesm12 The PlayerTeleportEvent does not have the ability to get who the player teleports to, only where they are going.
Apologies, I thought I checked this.
videogamesm12 What is the lag caused by? If it's the mere speed of the player, could we implement some sort of speed limiter (e.g. use the player movement event to determine how fast the player is moving)?
The main problem is that nothing is logged when you increase your speed to a high level in spectator mode. A speed limiter like you suggest is already built into Spigot (
spigot.yml), but it often doesn't work very nicely. This problem can also be alleviated by setting the
spectatorsGenerateChunks game rule to
false so that they can only load existing chunks.
When I made this list of problems, spectating an entity and then trying to use a teleport command that was not made with spectator mode in mind would spam the console with errors of the player failing to be teleported. These errors would continue until the player stopped spectating the entity of their own accord. However, I have not tested this recently, so there is a chance that this is already fixed.
videogamesm12 Could we use ProtocolLib to send packets to admins that show them if they are not in Spectator Mode themselves (e.g. using armor stands)?
Technically, yes, but I would suggest using the Lib's Disguises API instead for something like that.
videogamesm12 Is there a way we can use the ingame teams for ranks to disable their ability to see admins?
You're thinking of
seeFriendlyInvisibles, but that only applies to the invisibility effect, not spectator mode.