VivecraftSpigot is a companion plugin for Vivecraft, the VR mod for Java Minecraft. VivecraftSpigot is for Spigot servers and adds several enhancements for VR players.
DISCLAIMER: This is NOT the original version of the plugin. The original version can be found here. VivecraftSpigot is a drag-and-drop replacement, with a few differences:
Supports multiple versions (Currently 1.19.4, 1.20.2, and 1.20.4)
Has basic support for ALL versions (<1.19.4)
Has an API for plugins to use
Has a maven central repository
This means that you have to use com.cjcrafter.vivecraft instead of org.vivecraft
Please do NOT use the original plugin's discord for support requests. That cannot and will not help with this plugin. This plugin has no support channels. If you experience a bug, you can report it.
Features
Vivecraft players will see other Vivecraft players head and arm movements.
Support for Vivecraft 2-handed archery.
Assign permission groups for VR players.
Fixes projectiles and dropped items from VR players.
Shrinks Creeper explosion radius for VR players from 3 to 1.75m (Configurable)
Option to limit server to Vivecraft players only.
Please take a look at the config.yml for all available configuration options.
Converting from Vivecraft_Spigot_Extensions
Stop your server
Delete Vivecraft_Spigot_Extensions.jar
Rename the plugin folder to VivecraftSpigot
Download VivecraftSpigot and put it in your plugins folder
The original plugin's API only works on servers with one world, so I highly recommend staying away from the original plugin's Metadata system. Instead, you want to look at the VSE class which is the main plugin class. From there, you can get a VivePlayer instance and check controller position, direction, headset... etc.
Here is an example API usage from WeaponMechanics:
Code (Java):
// This snippet gets where the player should be shooting their gun from if(Bukkit.
getPluginManager().
getPlugin("Vivecraft-Spigot-Extensions")!=null && livingEntity.
getType()== EntityType.
PLAYER){ // Vivecraft support for VR players
VivePlayer vive
= VSE.
vivePlayers.
get(livingEntity.
getUniqueId()); if(vive
!=null&& vive.
isVR()){ // Now we know it's actually VR player
// Get the position and direction from player metadata Location location
= vive.
getControllerPos(mainhand
?0:1); location.
setDirection(vive.
getControllerDir(mainhand
?0:1)); return location
; }
// Not VR player, let pass to these normal location finders }