Skip to content

Metadata

fayer3 edited this page Oct 20, 2025 · 4 revisions

VSE provides Spigot metadata on Player objects so other plugins can provide special support for handed interactions or somesuch. If you aren’t sure what metadata is, check the Spigot documentation. The API supports multiple plugins using the same metadata key, so make sure you filter to our specific plugin name (Vivecraft-Spigot-Extension).

Bodypart data

Every player has a head and two hands (obviously), each of which have a 6DOF position and rotation. If a player has FBT trackers there is also data for the waist, feet, elbows and knees.

All of the bodypart metadata keys is only available if the server got data for the player, so check if the metadata key is available first.

The following bodyparts have metadata:

  • head
  • righthand
  • lefthand
  • waist
  • rightfoot
  • leftfoot
  • rightknee
  • leftknee
  • rightelbow
  • leftelbow

The following values are available for each bodypart (where X needs to be replaced with the bodypart name, ie: head.pos):

Key(s) Value
X.pos Bukkit Location representing the absolute position in the world of the VR object. Also includes the direction for convenience.
X.dir Bukkit Vector representing the forward direction of the VR object. This is gimbal locked; if you want up or right vectors, use the rot value below.
X.rot Array of 4 floats, representing a quaternion with the order w,x,y,z. You’ll need a Quaternion class to deal with this properly, but it’s much more flexible than the dir value. As of 1.19.4 Minecraft ships with Joml, whch has one of those, and this plugin also ships it for older versions.

Other Data

There are also some tertiary values so you can determine how to properly handle a particular player.

These are always available if the player is in VR.

The full set of available keys is as follows:

Key(s) Value
seated Boolean representing the player is in seated mode. This mode disables hand tracking and places the VR hands to the sides of the head, to allow for keyboard and mouse play in VR.
height Float representing whether the player's calibrated height, which mainly affects how tall they appear to other players.
lefthanded Boolean when true the player holds their mainhand items in the left hand
activehand String representing which bodypart last performed some actions. Currently throwing projectiles such as snowballs. This can either be a hand (left or right), or any other bodypart (HEAD, RIGHT_FOOT, LEFT_FOOT)
Clone this wiki locally