Preserve pitch and yaw from player
This commit is contained in:
		
							parent
							
								
									8485e34756
								
							
						
					
					
						commit
						c1dbe281a6
					
				@ -104,8 +104,15 @@ public class OnCustomPlayerMove implements CustomPlayerMoveEventListener {
 | 
				
			|||||||
            playerBeaconLocation.put(uuid, lbtBlockPartner);
 | 
					            playerBeaconLocation.put(uuid, lbtBlockPartner);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // Teleport
 | 
					            // Teleport
 | 
				
			||||||
 | 
					            Location loc = safeBlock.getLocation();
 | 
				
			||||||
 | 
					            // Middle of block
 | 
				
			||||||
 | 
					            loc.add(0.5, 0, 0.5);
 | 
				
			||||||
 | 
					            // Preserve pitch and yaw from player
 | 
				
			||||||
 | 
					            loc.setPitch(p.getLocation().getPitch());
 | 
				
			||||||
 | 
					            loc.setYaw(p.getLocation().getYaw());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            e.player().teleport(
 | 
					            e.player().teleport(
 | 
				
			||||||
                    safeBlock.getLocation().add(0.5, 0, 0.5)
 | 
					                loc
 | 
				
			||||||
            );
 | 
					            );
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user