mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 23:22:10 -07:00
Handle CraftPlayer#setSpectatorTarget better
Use a proper teleport for teleporting to entities in different worlds. Validate that the target entity is valid and deny spectate requests from frozen players. Also, make sure the entity is spawned to the client before sending the camera packet. If the entity isn't spawned clientside when it receives the camera packet, then the client will not spectate the target entity.
This commit is contained in:
@@ -116,7 +116,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- private boolean ci = true;
|
||||
+ private boolean ci = true; public boolean hasChatColorsEnabled() { return this.ci; } // Paper - OBFHELPER
|
||||
private long cj = SystemUtils.getMonotonicMillis();
|
||||
private Entity spectatedEntity; private void setSpectatorTargetField(Entity e) { this.spectatedEntity = e; } // Paper - OBFHELPER
|
||||
private Entity spectatedEntity;
|
||||
public boolean worldChangeInvuln;
|
||||
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
|
Reference in New Issue
Block a user