Package org.vivecraft.api
Interface VRAPI
public interface VRAPI
The main interface for interacting with Vivecraft from common code.
- Since:
- 1.3.0
-
Method Summary
Modifier and TypeMethodDescriptiongetHistoricalVRPoses
(Player player) Returns the history of VR poses for the player.getVRPose
(Player player) Returns the VR pose for the given player.static VRAPI
instance()
boolean
isVRPlayer
(Player player) Check whether a given player is currently in VR.
-
Method Details
-
instance
- Returns:
- The Vivecraft API instance for interacting with Vivecraft's common API.
- Since:
- 1.3.0
-
isVRPlayer
boolean isVRPlayer(Player player) Check whether a given player is currently in VR.- Parameters:
player
- The player to check the VR status of.- Returns:
- true if the player is in VR.
- Since:
- 1.3.0
-
getVRPose
Returns the VR pose for the given player. Will returnnull
if the player isn't in VR, or if being called from the client and the client has yet to receive any data for the player.- Parameters:
player
- Player to get the VR pose of.- Returns:
- The VR pose for a player, or
null
if the player isn't in VR or no data has been received for said player. - Since:
- 1.3.0
-
getHistoricalVRPoses
Returns the history of VR poses for the player. If one only needs the history for the local player, this can be more conveniently called usingVRClientAPI.getHistoricalVRPoses()
.
Note that due to the inherent latency of networking, historical VR data retrieved either by the server or by the client for a client other than the local player may be unideal.- Returns:
- The history of VR poses for the player. Will be
null
if the player isn't in VR or if VR-specific data hasn't been received. - Since:
- 1.3.0
-